Closed nicklog closed 5 years ago
Full example:
Dockerfile
FROM webdevops/php-nginx:7.2
RUN docker-service-enable cron
COPY etc /opt/docker/etc
etc/cron/crontab
SHELL=/bin/bash
# m h dom mon dow user command
* * * * * application /usr/local/bin/php /app/bin/console sw:cron:run
The logs are redirected to stdout
by supervisord
(which runs all applications in the container). Therefore you're able to see the cron logs by doing docker logs -f app_container
.
For production context you can e.g. use logstash to extract the cron logs from the docker log stream and show them separately.
Hey, I just created an example of how to use crontab with webdevops docker-compose, you can check it our here: https://github.com/abagayev/docker-bootstrap-collection/tree/master/crontab-in-container
Hey guys,
i like this boilerplate but i dont know to configure crontab.
I read the issues here in the repo but i dont get it to work and i didnt find any logs.
i tried these 4 variants
What is wrong? Can anyone please help?
Thank you very much.