Select Git revision
-
Reiter, Christoph authored
This adds busybox to the php-fpm image and creates a separate container via docker-compose which starts crond and calls our cron command every 5 minutes. This makes sure our cron jobs are called during development, just like on a production server.
Reiter, Christoph authoredThis adds busybox to the php-fpm image and creates a separate container via docker-compose which starts crond and calls our cron command every 5 minutes. This makes sure our cron jobs are called during development, just like on a production server.
docker-compose.yml 2.07 KiB
version: "3.1"
services:
webserver:
image: nginx:alpine
working_dir: /application
volumes:
- ..:/application
- ./webserver/nginx.conf:/etc/nginx/conf.d/default.conf
ports:
- "8000:80"
php-fpm:
environment:
- TERM_PROGRAM=Hyper # force colors for the symfony dumper
build:
context: php-fpm
depends_on:
- mariadb
- redis
working_dir: /application
volumes:
- ..:/application
- ./php-fpm/php-ini-overrides.ini:/etc/php/7.4/fpm/conf.d/99-overrides.ini
- ./php-fpm/php-fpm-overrides.conf:/etc/php/7.4/fpm/pool.d/z-overrides.conf
queue-worker:
environment:
- TERM_PROGRAM=Hyper # force colors for the symfony dumper
build:
context: php-fpm
depends_on:
- mariadb
- redis
working_dir: /application
entrypoint: supervisord -c /etc/supervisor/conf.d/queue-worker.conf
volumes:
- ./php-fpm/queue-worker.conf:/etc/supervisor/conf.d/queue-worker.conf
- ..:/application
- ./php-fpm/php-ini-overrides.ini:/etc/php/7.4/cli/conf.d/99-overrides.ini
cron:
build:
context: php-fpm
depends_on:
- mariadb
- redis
working_dir: /application
entrypoint: /cron.sh
volumes:
- ..:/application
- ./php-fpm/php-ini-overrides.ini:/etc/php/7.4/cli/conf.d/99-overrides.ini
redis:
image: "redis"
entrypoint: redis-server --save 60 1 --loglevel warning
volumes:
- redis-data:/data
redis-commander:
image: "rediscommander/redis-commander"
depends_on:
- redis
environment:
- REDIS_HOST=redis
ports:
- "8101:8081"
mariadb:
image: mariadb:10.3