zappyzep/docker-compose.production.yml

66 lines
1.8 KiB
YAML
Raw Normal View History

2022-07-16 22:16:34 +03:00
version: '3'
name: zeppelin-prod
services:
nginx:
build:
context: .
dockerfile: docker/production/nginx/Dockerfile
2022-07-16 22:16:34 +03:00
args:
API_PORT: ${API_PORT:?Missing API_PORT}
DOCKER_PROD_DOMAIN: ${DOCKER_PROD_DOMAIN:?Missing DOCKER_PROD_DOMAIN}
ports:
- "${DOCKER_PROD_WEB_PORT:?Missing DOCKER_PROD_WEB_PORT}:443"
volumes:
- ./:/zeppelin
mysql:
image: mysql:8.0
environment:
MYSQL_ROOT_PASSWORD: ${DOCKER_PROD_MYSQL_ROOT_PASSWORD?:Missing DOCKER_PROD_MYSQL_ROOT_PASSWORD}
MYSQL_DATABASE: zeppelin
MYSQL_USER: zeppelin
MYSQL_PASSWORD: ${DOCKER_PROD_MYSQL_PASSWORD?:Missing DOCKER_PROD_MYSQL_PASSWORD}
ports:
- ${DOCKER_PROD_MYSQL_PORT:?Missing DOCKER_PROD_MYSQL_PORT}:3306
volumes:
2022-08-06 22:18:21 +03:00
- ./docker/production/data/mysql:/var/lib/mysql
2022-07-16 22:16:34 +03:00
command: --authentication-policy=mysql_native_password
healthcheck:
test: "/usr/bin/mysql --user=root --password=\"${DOCKER_PROD_MYSQL_ROOT_PASSWORD}\" --execute \"SHOW DATABASES;\""
interval: 5s
timeout: 300s
retries: 60
2022-07-16 22:16:34 +03:00
migrate:
depends_on:
mysql:
condition: service_healthy
build:
context: .
dockerfile: docker/production/backend/Dockerfile
command: ["npm", "run", "migrate-prod"]
2022-07-16 22:16:34 +03:00
api:
depends_on:
migrate:
condition: service_completed_successfully
build:
context: .
dockerfile: docker/production/backend/Dockerfile
restart: on-failure
2023-04-04 20:44:13 +03:00
environment:
DEBUG: ${DEBUG-}
command: ["npm", "run", "start-api-prod"]
2022-07-16 22:16:34 +03:00
2022-08-06 22:18:21 +03:00
bot:
depends_on:
migrate:
condition: service_completed_successfully
build:
context: .
dockerfile: docker/production/backend/Dockerfile
restart: on-failure
2023-04-04 20:44:13 +03:00
environment:
DEBUG: ${DEBUG-}
2022-08-06 22:18:21 +03:00
command: ["/bin/bash", "/zeppelin/docker/production/start-bot.sh"]