diff --git a/README.md b/README.md
index 5d4b2e0..b357ca1 100644
--- a/README.md
+++ b/README.md
@@ -71,8 +71,8 @@ docker create \
-e PGID=1000 \
-e TZ=Europe/London \
-p 443:443 \
- -v :/config \
- -v :/data \
+ -v /path/to/appdata:/config \
+ -v /path/to/data:/data \
--restart unless-stopped \
linuxserver/nextcloud
```
@@ -94,8 +94,8 @@ services:
- PGID=1000
- TZ=Europe/London
volumes:
- - :/config
- - :/data
+ - /path/to/appdata:/config
+ - /path/to/data:/data
ports:
- 443:443
restart: unless-stopped
@@ -219,6 +219,7 @@ Once registered you can define the dockerfile to use with `-f Dockerfile.aarch64
## Versions
+* **31.03.20:** - Allow crontab to be user customized, fix logrotate.
* **17.01.20:** - Updated php.ini defaults and site config, including an optional HSTS directive (existing users should delete `/config/nginx/site-confs/default` and restart the container).
* **19.12.19:** - Rebasing to alpine 3.11.
* **18.11.19:** - Nginx default site config updated for v17 (existing users should delete `/config/nginx/site-confs/default` and restart the container).
diff --git a/readme-vars.yml b/readme-vars.yml
index 2145643..f1fd458 100644
--- a/readme-vars.yml
+++ b/readme-vars.yml
@@ -29,8 +29,8 @@ param_env_vars:
- { env_var: "TZ", env_value: "Europe/London", desc: "Specify a timezone to use EG Europe/London." }
param_usage_include_vols: true
param_volumes:
- - { vol_path: "/config", vol_host_path: "", desc: "Nextcloud configs." }
- - { vol_path: "/data", vol_host_path: "", desc: "Your personal data." }
+ - { vol_path: "/config", vol_host_path: "/path/to/appdata", desc: "Nextcloud configs." }
+ - { vol_path: "/data", vol_host_path: "/path/to/data", desc: "Your personal data." }
param_usage_include_ports: true
param_ports:
- { external_port: "443", internal_port: "443", port_desc: "WebUI" }
@@ -60,6 +60,7 @@ app_setup_block: |
# changelog
changelogs:
+ - { date: "31.03.20:", desc: "Allow crontab to be user customized, fix logrotate." }
- { date: "17.01.20:", desc: "Updated php.ini defaults and site config, including an optional HSTS directive (existing users should delete `/config/nginx/site-confs/default` and restart the container)." }
- { date: "19.12.19:", desc: "Rebasing to alpine 3.11." }
- { date: "18.11.19:", desc: "Nginx default site config updated for v17 (existing users should delete `/config/nginx/site-confs/default` and restart the container)." }
diff --git a/root/defaults/nextcloud b/root/defaults/nextcloud
deleted file mode 100644
index 594efac..0000000
--- a/root/defaults/nextcloud
+++ /dev/null
@@ -1 +0,0 @@
-*/5 * * * * s6-setuidgid abc php7 -f /config/www/nextcloud/cron.php
diff --git a/root/defaults/root b/root/defaults/root
new file mode 100644
index 0000000..536f6d6
--- /dev/null
+++ b/root/defaults/root
@@ -0,0 +1,9 @@
+# do daily/weekly/monthly maintenance
+# min hour day month weekday command
+*/15 * * * * run-parts /etc/periodic/15min
+0 * * * * run-parts /etc/periodic/hourly
+0 2 * * * run-parts /etc/periodic/daily
+0 3 * * 6 run-parts /etc/periodic/weekly
+0 5 1 * * run-parts /etc/periodic/monthly
+# nextcloud cron
+*/5 * * * * s6-setuidgid abc php7 -f /config/www/nextcloud/cron.php
diff --git a/root/etc/cont-init.d/50-install b/root/etc/cont-init.d/50-install
index b140986..075be36 100644
--- a/root/etc/cont-init.d/50-install
+++ b/root/etc/cont-init.d/50-install
@@ -2,7 +2,8 @@
# create folders
mkdir -p \
- "${NEXTCLOUD_PATH}"
+ "${NEXTCLOUD_PATH}" \
+ /config/crontabs
# install app
if [ ! -e "${NEXTCLOUD_PATH}/index.php" ]; then
@@ -14,4 +15,6 @@ if [ ! -e "${NEXTCLOUD_PATH}/index.php" ]; then
fi
# set cronjob
-crontab /defaults/nextcloud
+[[ ! -f /config/crontabs/root ]] && \
+ cp /defaults/root /config/crontabs/root
+cp /config/crontabs/root /etc/crontabs/root