Skip to content

Instantly share code, notes, and snippets.

@elvinlari
Created September 22, 2022 16:26
Show Gist options
  • Save elvinlari/46c0a0f7ce8ccf5b684ec76350f53a9e to your computer and use it in GitHub Desktop.
Save elvinlari/46c0a0f7ce8ccf5b684ec76350f53a9e to your computer and use it in GitHub Desktop.
Cron job service
laravel-cron:
build:
context: ./docker
dockerfile: php.dockerfile
args:
- UID=${UID:-1000}
- GID=${GID:-1000}
- USER=${USER:-laravel}
container_name: laravel-cron
volumes:
- ./src:/var/www/html
- .env:/var/www/html/.env
depends_on:
- mysql
working_dir: /var/www/html
entrypoint: ['php', '/var/www/html/artisan', 'schedule:work']
networks:
- laravel
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment