service-captcha/docker-compose-prod_docker-hub.yml

44 lines
975 B
YAML
Raw Normal View History

2024-04-25 19:56:34 +05:00
version: '3.7'
services:
nginx:
build:
context: ./nginx
dockerfile: Dockerfile
# restart: always
depends_on:
- app
- swagger
ports:
- ${DOCKER_NGINX_PORT}:80
app:
image: korelf/service-captcha:0.7.1
# restart: always
depends_on:
- db
- redis
env_file: app/.env
redis:
image: redis:3.0-alpine
# restart: always
swagger:
image: swaggerapi/swagger-ui
depends_on:
- app
environment:
URLS: "[ { url: '/swagger.json', name: '/swagger.json' } ]"
BASE_URL: /api-docs
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