#version: '3.7' services: web: build: context: app dockerfile: docker/Dockerfile target: WEB_PRODUCTION # restart: always depends_on: - app ports: - ${DOCKER_WEB_PORT}:80 environment: IS_GZIP: 1 # FRONTEND_PORT: ${DOCKER_WEB_PORT} BACKEND_HOST: app BACKEND_PORT: 9000 TRUSTED_PROXY_CIDR: 172.16.0.0/12 # Enable swagger ENABLE_API_DOCS: 1 volumes: - ./app/application/public:/usr/share/nginx/html - ./app/application/storage/app/public:/usr/share/nginx/html/storage app: build: context: app dockerfile: docker/Dockerfile target: APP_PRODUCTION # restart: always depends_on: - db - redis - reverb env_file: app/application/.env volumes: - ./app/application:/var/www/html environment: CONTAINER_ROLE: app APP_ENV: production queue: build: context: app dockerfile: docker/Dockerfile target: APP_PRODUCTION # restart: always depends_on: - db - redis environment: CONTAINER_ROLE: queue APP_ENV: production volumes: - ./app/application:/var/www/html reverb: build: context: app dockerfile: docker/Dockerfile target: APP_PRODUCTION # restart: always depends_on: - db - redis environment: CONTAINER_ROLE: websockets APP_ENV: production ports: - ${DOCKER_WEBSOCKET_PORT}:9000 volumes: - ./app/application:/var/www/html scheduler: build: context: app dockerfile: docker/Dockerfile target: APP_PRODUCTION # restart: always depends_on: - db - redis environment: CONTAINER_ROLE: scheduler APP_ENV: production volumes: - ./app/application:/var/www/html swagger: image: swaggerapi/swagger-ui # restart: always depends_on: - app environment: URLS: "[ { url: '/swagger.json', name: '/swagger.json' } ]" BASE_URL: /api-docs redis: image: redis:3.0-alpine # restart: always volumes: - ./redis/data:/data db: image: docker.io/mysql:8.0.33 command: --default-authentication-plugin=mysql_native_password #restart: always ports: - ${DOCKER_DB_PORT}:3306 environment: MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD} MYSQL_DATABASE: ${DB_DATABASE} MYSQL_USER: ${DB_USERNAME} MYSQL_PASSWORD: ${DB_PASSWORD} volumes: - ./db/data:/var/lib/mysql