Files
service-captcha/docker-compose.yml
T

125 lines
3.3 KiB
YAML

#version: '3.7'
services:
web:
build:
context: app
dockerfile: docker/Dockerfile
target: WEB_DEVELOP
depends_on:
- db
- redis
- app
- reverb
ports:
- ${DOCKER_WEB_PORT}:80
environment:
IS_GZIP: 0
FRONTEND_PORT: ${DOCKER_WEB_PORT}
BACKEND_HOST: app
BACKEND_PORT: 9000
# Enable swagger
ENABLE_API_DOCS: 1
# TRUSTED_PROXY_CIDR: 172.16.0.0/12
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_DEVELOP
depends_on:
- db
- redis
- reverb
volumes:
- ./app/application:/var/www/html
environment:
CONTAINER_ROLE: app
APP_ENV: local
queue:
build:
context: app
dockerfile: docker/Dockerfile
target: APP_DEVELOP
depends_on:
- db
- redis
environment:
CONTAINER_ROLE: queue
volumes:
- ./app/application:/var/www/html
reverb:
build:
context: app
dockerfile: docker/Dockerfile
target: APP_DEVELOP
depends_on:
- db
- redis
environment:
CONTAINER_ROLE: websockets
ports:
- ${DOCKER_WEBSOCKET_PORT}:9000
volumes:
- ./app/application:/var/www/html
scheduler:
build:
context: app
dockerfile: docker/Dockerfile
target: APP_DEVELOP
depends_on:
- db
- redis
environment:
CONTAINER_ROLE: scheduler
volumes:
- ./app/application:/var/www/html
redis:
image: redis:3.0-alpine
volumes:
- ./redis/data:/data
db:
image: mysql:8.0.33
command: --default-authentication-plugin=mysql_native_password
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
swagger:
image: swaggerapi/swagger-ui
environment:
URLS: "[ { url: '/swagger.json', name: '/swagger.json' } ]"
BASE_URL: /api-docs
artisan:
build:
context: app
dockerfile: docker/Dockerfile
target: ARTISAN
user: "${UID}:${GID}"
volumes:
- ./app/application:/var/www/html
composer:
build:
context: app
dockerfile: docker/Dockerfile
target: COMPOSER
user: "${UID}:${GID}"
volumes:
- ./app/application:/var/www/html
npm:
build:
context: app
dockerfile: docker/Dockerfile
target: NPM
user: "${UID}:${GID}"
volumes:
- ./app/application:/var/www/html