service-captcha-demo/docker-compose_prod.yml

96 lines
2.1 KiB
YAML
Raw Normal View History

2023-12-09 01:30:59 +06:00
version: '3.7'
services:
app:
build:
context: .
dockerfile: ./docker/app/Dockerfile
target: PRODUCTION
depends_on:
- captcha-nginx
cap_drop:
- ALL
cap_add:
- SETGID
- SETUID
- CHOWN
- FOWNER
ports:
- ${DOCKER_APP_PORT}:9000
captcha-nginx:
build:
context: ./docker/nginx-captcha
dockerfile: Dockerfile
depends_on:
- captcha-app
- captcha-swagger
ports:
- ${DOCKER_CAPTCHA_NGINX_PORT}:80
captcha-app:
2024-04-28 19:58:09 +05:00
image: korelf/service-captcha:0.8.1
2023-12-09 01:30:59 +06:00
cap_drop:
- ALL
cap_add:
- SETGID
- SETUID
- CHOWN
- FOWNER
ports:
- "9000"
depends_on:
- captcha-redis
2024-04-28 13:10:52 +05:00
- captcha-reverb
2023-12-09 01:30:59 +06:00
- db
env_file: docker/captcha-app/.env
2024-04-28 13:10:52 +05:00
captcha-queue:
2024-04-28 19:58:09 +05:00
image: korelf/service-captcha:0.8.1
2024-04-28 13:10:52 +05:00
# restart: always
depends_on:
- db
- captcha-redis
environment:
CONTAINER_ROLE: queue
env_file: docker/captcha-app/.env
captcha-reverb:
2024-04-28 19:58:09 +05:00
image: korelf/service-captcha:0.8.1
2024-04-28 13:10:52 +05:00
# restart: always
depends_on:
- db
- captcha-redis
environment:
CONTAINER_ROLE: websockets
env_file: docker/captcha-app/.env
ports:
- ${DOCKER_WEBSOCKET_PORT}:9000
captcha-scheduler:
2024-04-28 19:58:09 +05:00
image: korelf/service-captcha:0.8.1
2024-04-28 13:10:52 +05:00
# restart: always
depends_on:
- db
- captcha-redis
environment:
CONTAINER_ROLE: scheduler
env_file: docker/captcha-app/.env
2023-12-09 01:30:59 +06:00
captcha-swagger:
image: swaggerapi/swagger-ui
environment:
URLS: "[ { url: '/swagger.json', name: '/swagger.json' } ]"
BASE_URL: /api-docs
ports:
- "8080"
captcha-redis:
image: redis:3.0-alpine
db:
image: mysql:8.0.33
command: --default-authentication-plugin=mysql_native_password
#restart: always
ports:
- "3306"
environment:
MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD}
MYSQL_DATABASE: ${DB_DATABASE}
MYSQL_USER: ${DB_USERNAME}
MYSQL_PASSWORD: ${DB_PASSWORD}
volumes:
- ./docker/db/data:/var/lib/mysql