You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I pulled your image and tried to configure cron to run laravel scheduler. To test the setup, I am logging message through scheduler but it is not working.
I pulled your image and tried to configure cron to run laravel scheduler. To test the setup, I am logging message through scheduler but it is not working.
Here is the configuration I did -
docker-compose.yml -
-Cron-job container
cron:
build:
context: ./crontab
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
networks:
- app-network
-PHP Service - laravel project container
app:
build:
context: .
dockerfile: Dockerfile
image: digitalocean.com/php
container_name: app
restart: unless-stopped
tty: true
environment:
SERVICE_NAME: app
SERVICE_TAGS: dev
working_dir: /var/www
volumes:
- ./:/var/www
- ./php/local.ini:/usr/local/etc/php/conf.d/local.ini
networks:
- app-network
-Docker Networks
networks:
app-network:
driver: bridge
Crontab (directory - cron configuration)
config.json -
[{ "comment":"cron with triggered commands", "schedule":"* * * * *", "command":"php /var/www/artisan schedule:run >> /dev/null 2>&1", "project":"paula", "container":"app" }]
Dockerfile -
`FROM willfarrell/crontab
COPY config.json ${HOME_DIR}/
Please help me with this problem.
The text was updated successfully, but these errors were encountered: