Skip to content
Snippets Groups Projects
Select Git revision
  • a7f97ef23b33ef988829e4c790e79d9ded62698a
  • main default protected
  • ci-test
  • v0.1.4
  • v0.1.3
  • v0.1.2
  • v0.1.1
  • v0.1.0
8 results

docker-compose.yml

Blame
    • Reiter, Christoph's avatar
      a7f97ef2
      docker: add a cron docker service · a7f97ef2
      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.
      a7f97ef2
      History
      docker: add a cron docker service
      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.
    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