Add service container for executing cron tasks
This commit is contained in:
parent
fb6290d01f
commit
abea6087e5
@ -23,7 +23,10 @@ services:
|
||||
|
||||
php-fpm-nextcloud:
|
||||
container_name: php-fpm-nextcloud
|
||||
build: ./php-fpm
|
||||
build:
|
||||
context: ./php-fpm
|
||||
tags:
|
||||
- localhost/php-fpm-nextcloud:latest
|
||||
volumes:
|
||||
- ${NEXTCLOUD_DIR}:/var/www/html
|
||||
- ${DATA_DIR}:/data
|
||||
@ -54,6 +57,25 @@ services:
|
||||
networks:
|
||||
- nextcloud
|
||||
|
||||
cron-nextcloud:
|
||||
container_name: cron-nextcloud
|
||||
image: localhost/php-fpm-nextcloud:latest
|
||||
restart: unless-stopped
|
||||
command:
|
||||
- bash
|
||||
- -c
|
||||
- "'while true; do php --define apc.enable_cli=1 /var/www/html/cron.php && sleep 300; done'"
|
||||
networks:
|
||||
- nextcloud
|
||||
user: www-data
|
||||
volumes:
|
||||
- ${NEXTCLOUD_DIR}:/var/www/html
|
||||
- ${DATA_DIR}:/data
|
||||
depends_on:
|
||||
- php-fpm-nextcloud
|
||||
- redis-nextcloud
|
||||
- mariadb-nextcloud
|
||||
|
||||
networks:
|
||||
nextcloud:
|
||||
driver: bridge
|
||||
|
Loading…
Reference in New Issue
Block a user