Install new cron per docker-compose
This commit is contained in:
parent
837c0196d5
commit
6cc7d781bd
2 changed files with 24 additions and 1 deletions
4
nextcloud/crontab
Normal file
4
nextcloud/crontab
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
*/5 * * * * php -f /var/www/html/cron.php
|
||||||
|
1,11,21,31,41,51 * * * * php -f /var/www/html/occ files:cleanup
|
||||||
|
2,12,22,32,42,52 * * * * php -f /var/www/html/occ files:scan --all
|
||||||
|
#3,13,23,33,43,53 * * * * php -f /var/www/html/occ preview:pre-generate
|
|
@ -27,8 +27,9 @@ services:
|
||||||
- "traefik.http.routers.nextcloud.middlewares=nextcloudHeader"
|
- "traefik.http.routers.nextcloud.middlewares=nextcloudHeader"
|
||||||
- "docker.group=netxtcloud"
|
- "docker.group=netxtcloud"
|
||||||
|
|
||||||
|
|
||||||
app:
|
app:
|
||||||
image: nextcloud:22-fpm
|
image: nextcloud:${NC_MAIN_VERSION}-fpm
|
||||||
volumes:
|
volumes:
|
||||||
- ${VOLUMES_PATH}/nextcloud_html:/var/www/html
|
- ${VOLUMES_PATH}/nextcloud_html:/var/www/html
|
||||||
- ${VOLUMES_PATH}/nextcloud_data:/var/www/html/data
|
- ${VOLUMES_PATH}/nextcloud_data:/var/www/html/data
|
||||||
|
@ -48,6 +49,23 @@ services:
|
||||||
- redis
|
- redis
|
||||||
labels:
|
labels:
|
||||||
- "docker.group=netxtcloud"
|
- "docker.group=netxtcloud"
|
||||||
|
|
||||||
|
|
||||||
|
cron:
|
||||||
|
image: nextcloud:${NC_MAIN_VERSION}-fpm
|
||||||
|
restart: unless-stopped
|
||||||
|
networks:
|
||||||
|
- nextcloud
|
||||||
|
volumes:
|
||||||
|
- ${VOLUMES_PATH}/nextcloud_html:/var/www/html
|
||||||
|
- ${VOLUMES_PATH}/nextcloud_data:/var/www/html/data
|
||||||
|
- $PWD/crontab:/var/spool/cron/crontabs/www-data:ro
|
||||||
|
entrypoint: /cron.sh
|
||||||
|
depends_on:
|
||||||
|
- db
|
||||||
|
- redis
|
||||||
|
labels:
|
||||||
|
- "docker.group=netxtcloud"
|
||||||
|
|
||||||
|
|
||||||
db:
|
db:
|
||||||
|
@ -69,6 +87,7 @@ services:
|
||||||
labels:
|
labels:
|
||||||
- "docker.group=netxtcloud"
|
- "docker.group=netxtcloud"
|
||||||
|
|
||||||
|
|
||||||
redis:
|
redis:
|
||||||
image: redis:alpine
|
image: redis:alpine
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
|
|
Loading…
Reference in a new issue