Skip to content
Snippets Groups Projects
docker-compose.yml 1.73 KiB
Newer Older
  • Learn to ignore specific revisions
  • version: '3.7'
    services:
      phpdeps:
        image: prooph/composer:7.3
        volumes:
          - .:/app
        command: install
      assets:
        image: node:10
        volumes:
          - .:/usr/src/app
        working_dir: /usr/src/app
        command: bash -c "npm install && npm run watch"
      dependencies:
    
        image: php:7.3-cli-alpine
    
        volumes:
          - .:/data
        working_dir: /data
    
        command: /bin/sh -c "apk add --update dos2unix && dos2unix ./init.sh && ./init.sh && ./init.sh"
    
        restart: on-failure
    
        image: mariadb:latest
        command: --default-authentication-plugin=mysql_native_password
        environment:
          - MYSQL_RANDOM_ROOT_PASSWORD=yes
          - MYSQL_USER=metager
          - MYSQL_PASSWORD=metager
          - MYSQL_DATABASE=metager
    
      redis:
        restart: on-failure
        image: redis:6.0-rc1-alpine
      phpfpm:
    
          - "dependencies"
          - "phpdeps"
          - "assets"
    
          - "redis"
    
        restart: on-failure
        build:
          context: .
    
    Dominik Hebeler's avatar
    Dominik Hebeler committed
          dockerfile: DockerfileDev
    
        image: metager:latest
        working_dir: /html
        volumes:
          - .:/html
      nginx:
        depends_on:
          - "phpfpm"
        restart: on-failure
        image: metager:latest
    
        working_dir: /html
    
    Dominik Hebeler's avatar
    Dominik Hebeler committed
        command: nginx
    
          - ./config/nginx.conf:/etc/nginx/nginx.conf
          - ./config/nginx-default.conf:/etc/nginx/conf.d/default.conf
    
      worker:
        depends_on:
          - "phpfpm"
        restart: on-failure
        image: metager:latest
        working_dir: /html
        volumes:
          - .:/html
        command: "su -s /bin/sh -c 'php artisan requests:fetcher' nginx"
    
      test:
        depends_on:
          - "phpfpm"
        image: php:7.3-cli
        working_dir: /html
        volumes:
          - .:/html
    
        command: "php artisan dusk"