2022-07-16 22:16:34 +03:00
|
|
|
version: '3'
|
|
|
|
name: zeppelin-prod
|
|
|
|
services:
|
|
|
|
nginx:
|
|
|
|
build:
|
2023-07-01 10:33:35 +00:00
|
|
|
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
|
2022-08-13 23:23:44 +03:00
|
|
|
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
|
|
|
|
2023-07-01 10:33:35 +00:00
|
|
|
migrate:
|
2022-08-07 12:23:27 +03:00
|
|
|
build:
|
2023-07-01 10:33:35 +00:00
|
|
|
context: .
|
|
|
|
dockerfile: docker/production/backend/Dockerfile
|
|
|
|
command: ["npm", "run", "migrate-prod"]
|
2022-07-16 22:16:34 +03:00
|
|
|
|
|
|
|
api:
|
|
|
|
depends_on:
|
2023-07-01 10:33:35 +00:00
|
|
|
migrate:
|
2023-06-26 19:26:44 +00:00
|
|
|
condition: service_completed_successfully
|
2023-07-01 10:33:35 +00:00
|
|
|
build:
|
|
|
|
context: .
|
|
|
|
dockerfile: docker/production/backend/Dockerfile
|
|
|
|
restart: on-failure
|
2023-04-04 20:44:13 +03:00
|
|
|
environment:
|
|
|
|
DEBUG: ${DEBUG-}
|
2023-06-26 19:35:19 +00:00
|
|
|
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:
|
2023-07-01 10:33:35 +00:00
|
|
|
migrate:
|
2023-06-26 19:26:44 +00:00
|
|
|
condition: service_completed_successfully
|
2023-07-01 10:33:35 +00:00
|
|
|
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"]
|