mirror of
https://github.com/nextcloud/docker.git
synced 2025-03-14 02:25:08 +01:00
Example: Add container for cron job
This commit is contained in:
parent
46f75cc0da
commit
0ced0171a7
1 changed files with 20 additions and 0 deletions
|
@ -59,6 +59,26 @@ services:
|
|||
- proxy-tier
|
||||
restart: always
|
||||
|
||||
cron:
|
||||
image: nextcloud:fpm
|
||||
container_name: cron
|
||||
links:
|
||||
- db
|
||||
volumes_from:
|
||||
- app
|
||||
user: www-data
|
||||
entrypoint: |
|
||||
bash -c 'bash -s <<EOF
|
||||
trap "break;exit" SIGHUP SIGINT SIGTERM
|
||||
while /bin/true; do
|
||||
/usr/local/bin/php /var/www/html/cron.php
|
||||
sleep 900
|
||||
done
|
||||
EOF'
|
||||
networks:
|
||||
- proxy-tier
|
||||
restart: always
|
||||
|
||||
db:
|
||||
image: mariadb
|
||||
container_name: db
|
||||
|
|
Loading…
Add table
Reference in a new issue