forked from ZeppelinBot/Zeppelin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.production.yml
62 lines (57 loc) · 1.75 KB
/
docker-compose.production.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
version: '3'
services:
nginx:
build:
context: .
dockerfile: docker/production/nginx/Dockerfile
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: mariadb
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:
- ./docker/production/data/mysql:/var/lib/mysql
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
migrate:
build:
context: .
dockerfile: docker/production/backend/Dockerfile
command: ["npm", "run", "migrate-prod"]
api:
depends_on:
migrate:
condition: service_completed_successfully
build:
context: .
dockerfile: docker/production/backend/Dockerfile
restart: on-failure
environment:
DEBUG: ${DEBUG-}
command: ["npm", "run", "start-api-prod"]
bot:
depends_on:
migrate:
condition: service_completed_successfully
build:
context: .
dockerfile: docker/production/backend/Dockerfile
restart: on-failure
environment:
DEBUG: ${DEBUG-}
command: ["/bin/bash", "/zeppelin/docker/production/start-bot.sh"]