service-captcha-demo/docker-compose.yml

59 lines
1.3 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: DEVELOP
depends_on:
- captcha-nginx
ports:
- ${DOCKER_APP_PORT}:9000
volumes:
- ./app:/var/www/html
captcha-nginx:
build:
context: ./docker/nginx-captcha
dockerfile: Dockerfile
depends_on:
- captcha-app
- captcha-swagger
ports:
- ${DOCKER_CAPTCHA_NGINX_PORT}:80
captcha-app:
image: korelf/service-captcha:0.7.0
cap_drop:
- ALL
cap_add:
- SETGID
- SETUID
- CHOWN
- FOWNER
ports:
- "9000"
depends_on:
- captcha-redis
- db
env_file: docker/captcha-app/.env
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