-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcompose.test.yml
97 lines (91 loc) · 2.61 KB
/
compose.test.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
85
86
87
88
89
90
91
92
93
94
95
96
97
# See: https://docs.docker.com/compose/multiple-compose-files/merge/
services:
testing:
restart: no
build:
dockerfile: Dockerfile.test
depends_on:
reverse-proxy:
condition: service_healthy
frontend:
condition: service_healthy
backend-latest:
condition: service_healthy
backend-v1:
condition: service_healthy
network_mode: "host"
environment:
TESTING: "true" # Client accept self-signed certificates
APP_DOMAIN_NAME: ${APP_DOMAIN_NAME:?}
APP_DATABASE_USERNAME: ${APP_DATABASE_USERNAME:-user-default}
APP_DATABASE_HOST: database
DRIFT_MONITOR_URL: ${DRIFT_MONITOR_URL:-https://reverse-proxy}
DRIFT_MONITOR_MYTOKEN: ${DRIFT_MONITOR_MYTOKEN:?}
reverse-proxy:
restart: no
environment:
TRAEFIK_CERTIFICATESRESOLVERS_RESOLVER0_ACME_CASERVER: "https://acme-staging-v02.api.letsencrypt.org/directory"
TRAEFIK_ENTRYPOINTS_WEB_HTTP_REDIRECTIONS_ENTRYPOINT_TO: "websecure"
TRAEFIK_ENTRYPOINTS_WEB_HTTP_REDIRECTIONS_ENTRYPOINT_SCHEME: "https"
healthcheck:
test: "traefik healthcheck"
start_interval: 1s
start_period: 10s
frontend:
restart: no
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: no
build:
target: production
environment:
APP_DATABASE_NAME: test-data
depends_on:
database:
condition: service_healthy
healthcheck:
test: "curl -X GET --fail localhost:5000"
start_interval: 1s
start_period: 10s
backend-v1:
restart: no
build:
target: production
environment:
APP_DATABASE_NAME: test-data
depends_on:
database:
condition: service_healthy
healthcheck:
test: "curl -X GET --fail localhost:5000"
start_interval: 1s
start_period: 10s
database:
restart: no
ports:
- "27017:27017"
volumes:
- ./sandbox/load-database.sh:/docker-entrypoint-initdb.d/load-db.sh:ro
- ./sandbox/database:/tmp/database
environment:
MONGO_INITDB_DATABASE: test-data
healthcheck:
test: mongosh --eval 'db.runCommand("ping").ok' localhost:27017 --quiet
start_interval: 1s
start_period: 10s
secrets:
database_password:
file: sandbox/secrets/app_database_password