-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcompose.prod.yml
84 lines (77 loc) · 2.03 KB
/
compose.prod.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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
# See: https://docs.docker.com/compose/multiple-compose-files/merge/
services:
reverse-proxy:
environment:
TRAEFIK_ENTRYPOINTS_WEB_HTTP_REDIRECTIONS_ENTRYPOINT_TO: "websecure"
TRAEFIK_ENTRYPOINTS_WEB_HTTP_REDIRECTIONS_ENTRYPOINT_SCHEME: "https"
volumes:
- letsencrypt:/letsencrypt
healthcheck:
test: "traefik healthcheck"
start_interval: 1s
start_period: 10s
swagger-ui:
environment:
URLS: >
[
{"name": "HTTPS-latest", "url": "https://${APP_DOMAIN_NAME:?}/api/latest/specification.json"},
{"name": "HTTPS-v1", "url": "https://${APP_DOMAIN_NAME:?}/api/v1/specification.json"}
]
depends_on:
reverse-proxy:
condition: service_healthy
frontend:
restart: always
build:
target: production
environment:
DRIFT_MONITOR_SCHEME: https
DRIFT_MONITOR_HOST: ${APP_DOMAIN_NAME:?}
DRIFT_MONITOR_PORT: 443
DRIFT_MONITOR_VERSION: latest
depends_on:
backend-latest:
condition: service_healthy
healthcheck:
test: "curl -X GET --fail localhost:8501"
start_interval: 1s
start_period: 10s
backend-latest:
restart: always
build:
target: production
depends_on:
database:
condition: service_healthy
healthcheck:
test: "curl -X GET --fail localhost:5000"
start_interval: 1s
start_period: 10s
backend-v1:
restart: always
build:
target: production
depends_on:
database:
condition: service_healthy
secrets:
- source: database_password
target: app_database_password
healthcheck:
test: "curl -X GET --fail localhost:5000"
start_interval: 1s
start_period: 10s
database:
restart: always
volumes:
- data-db:/data/db
healthcheck:
test: mongosh --eval 'db.runCommand("ping").ok' localhost:27017 --quiet
start_interval: 1s
start_period: 10s
secrets:
database_password:
file: secrets/app_database_password
volumes:
letsencrypt:
data-db: