mdhub/docker-compose.yml

166 lines
4.7 KiB
YAML

version: '3.7'
services:
app:
build:
context: app
dockerfile: docker/Dockerfile
target: DEVELOP
depends_on:
- db
- app-redis
- captcha-app
ports:
- ${DOCKER_APP_PORT}:9000
volumes:
- ./app/application:/var/www/html
- ./certs:/var/www/html/resources/certs:ro
queue:
build:
context: app
dockerfile: docker/Dockerfile
target: DEVELOP
depends_on:
- db
- app-redis
environment:
CONTAINER_ROLE: queue
volumes:
- ./app/application:/var/www/html
- ./certs:/var/www/html/resources/certs:ro
scheduler:
build:
context: app
dockerfile: docker/Dockerfile
target: DEVELOP
depends_on:
- db
- app-redis
environment:
CONTAINER_ROLE: scheduler
volumes:
- ./app/application:/var/www/html
- ./certs:/var/www/html/resources/certs:ro
app-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
captcha-app:
image: korelf/service-captcha:0.8.2
cap_drop:
- ALL
cap_add:
- SETGID
- SETUID
- CHOWN
- FOWNER
depends_on:
- db
- captcha-redis
env_file: captcha-app/.env
volumes:
- ./captcha-app/app/storage/app:/var/www/html/storage/app
- ./captcha-app/app/storage/logs:/var/www/html/storage/logs
ports:
- ${DOCKER_CAPTCHA_PORT}:9000
captcha-queue:
image: korelf/service-captcha:0.8.2
# restart: always
depends_on:
- db
- captcha-redis
environment:
CONTAINER_ROLE: queue
env_file: captcha-app/.env
volumes:
- ./captcha-app/app/storage/app:/var/www/html/storage/app
- ./captcha-app/app/storage/logs:/var/www/html/storage/logs
captcha-reverb:
image: korelf/service-captcha:0.8.2
# restart: always
depends_on:
- db
- captcha-redis
environment:
CONTAINER_ROLE: websockets
env_file: captcha-app/.env
volumes:
- ./captcha-app/app/storage/app:/var/www/html/storage/app
- ./captcha-app/app/storage/logs:/var/www/html/storage/logs
ports:
- ${DOCKER_CAPTCHA_WEBSOCKET_PORT}:9000
captcha-scheduler:
image: korelf/service-captcha:0.8.2
# restart: always
depends_on:
- db
- captcha-redis
environment:
CONTAINER_ROLE: scheduler
env_file: captcha-app/.env
volumes:
- ./captcha-app/app/storage/app:/var/www/html/storage/app
- ./captcha-app/app/storage/logs:/var/www/html/storage/logs
captcha-redis:
image: redis:3.0-alpine
volumes:
- ./captcha-app/redis/data:/data
registry-web:
image: nginx:alpine
ports:
- ${DOCKER_REGISTRY_WEB}:80
depends_on:
- registry
volumes:
- ./registry/nginx/nginx.conf:/etc/nginx/nginx.conf:ro
registry:
image: registry:2
volumes:
- ./registry/data:/images
- ./certs:/certs:ro
- ./registry/config.yml:/etc/docker/registry/config.yml:ro