mirror of
https://github.com/linuxserver/docker-nextcloud.git
synced 2026-02-19 23:03:50 +08:00
user customizable crontab, fix lofrotate
This commit is contained in:
parent
819482117b
commit
85dcc3d9f3
@ -71,8 +71,8 @@ docker create \
|
||||
-e PGID=1000 \
|
||||
-e TZ=Europe/London \
|
||||
-p 443:443 \
|
||||
-v </path/to/appdata>:/config \
|
||||
-v <path/to/data>:/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:
|
||||
- </path/to/appdata>:/config
|
||||
- <path/to/data>:/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).
|
||||
|
||||
@ -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: "</path/to/appdata>", desc: "Nextcloud configs." }
|
||||
- { vol_path: "/data", vol_host_path: "<path/to/data>", 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)." }
|
||||
|
||||
@ -1 +0,0 @@
|
||||
*/5 * * * * s6-setuidgid abc php7 -f /config/www/nextcloud/cron.php
|
||||
9
root/defaults/root
Normal file
9
root/defaults/root
Normal file
@ -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
|
||||
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user