Install new cron per docker-compose

This commit is contained in:
Florian Zirker 2021-11-24 15:36:30 +01:00
parent 837c0196d5
commit 6cc7d781bd
2 changed files with 24 additions and 1 deletions

4
nextcloud/crontab Normal file
View 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

View file

@ -27,8 +27,9 @@ services:
- "traefik.http.routers.nextcloud.middlewares=nextcloudHeader"
- "docker.group=netxtcloud"
app:
image: nextcloud:22-fpm
image: nextcloud:${NC_MAIN_VERSION}-fpm
volumes:
- ${VOLUMES_PATH}/nextcloud_html:/var/www/html
- ${VOLUMES_PATH}/nextcloud_data:/var/www/html/data
@ -50,6 +51,23 @@ services:
- "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:
image: mariadb:10
command: --transaction-isolation=READ-COMMITTED --binlog-format=ROW --skip-innodb-read-only-compressed
@ -69,6 +87,7 @@ services:
labels:
- "docker.group=netxtcloud"
redis:
image: redis:alpine
restart: unless-stopped