So I have a docker instance of nextcloud and using the nextcloud-fpm image behind a nginx reverse proxy:
version: '2.2'
volumes:
nextcloud:
db:
services:
db:
image: mariadb
command: --transaction-isolation=READ-COMMITTED --binlog-format=ROW
restart: always
volumes:
- /var/lib/nextcloud/db:/var/lib/mysql
environment:
- MYSQL_ROOT_PASSWORD=..
- MYSQL_PASSWORD=..
- MYSQL_DATABASE=..
- MYSQL_USER=..
app:
image: nextcloud:fpm
links:
- db
volumes:
- /var/lib/nextcloud/data:/var/www/html
restart: always
cron:
image: nextcloud:fpm
restart: always
volumes:
- /var/lib/nextcloud/data:/var/www/html
entrypoint: /cron.sh
depends_on:
- db
web:
image: nginx
ports:
- 127.0.0.1:5554:80
links:
- app
volumes:
- ./nginx.conf:/etc/nginx/nginx.conf:ro
volumes_from:
- app
restart: always
I wanted to enable cron as you can see in the docker-compose.yml. I switched the settings to cron inside of the web settings and now I get the error that something is going wrong. The log of the docker-compose shows:
Apr 26 19:33:00 host docker-compose[28836]: cron_1 | crond: wakeup dt=60
Apr 26 19:33:00 host docker-compose[28836]: cron_1 | crond: file www-data:
Apr 26 19:33:00 host docker-compose[28836]: cron_1 | crond: line php -f /var/www/html/cron.php
How can I check if cron is working properly? Is the error message showing because the cron isn’t coming from inside the app service?
EDIT: Basically the same question mentioned here