-
Notifications
You must be signed in to change notification settings - Fork 38
/
Copy pathdocker-compose.ci.yaml
162 lines (151 loc) · 4.32 KB
/
docker-compose.ci.yaml
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
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
version: "3"
services:
####################### Flyway Migration Verification Definition #######################
# Used to verify return code of migrations
# TODO: replace these by setting up pipeline ENV for assign perm template migration
flyway-verify:
container_name: mds_flyway_verify
build:
context: migrations
dockerfile: Dockerfile.flyway.dev
environment:
- FLYWAY_USER=mds
- FLYWAY_HOME=/flyway
- FLYWAY_PASSWORD=test
- FLYWAY_DB_NAME=mds
- FLYWAY_DB_HOST=postgres-verify
- FLYWAY_URL=jdbc:postgresql://postgres-verify/mds
- FLYWAY_OUT_OF_ORDER=true
- FLYWAY_CONNECT_RETRIES=60
- PLATFORM=ci
depends_on:
- postgres-verify
####################### Postgres Verification Definition #######################
postgres-verify:
restart: always
container_name: mds_postgres_verify
build:
context: services/postgres
dockerfile: Dockerfile
environment:
- POSTGRES_USER=mds
- POSTGRES_PASSWORD=test
- POSTGRES_DB=mds
ports:
- "5432:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
healthcheck:
test: [ "CMD", "pg_isready" ]
interval: 5s
timeout: 5s
retries: 10
####################### Postgres Definition #######################
postgres:
restart: always
container_name: mds_postgres
build:
context: services/postgres
dockerfile: Dockerfile
environment:
- POSTGRES_USER=mds
- POSTGRES_PASSWORD=test
- POSTGRES_DB=mds
ports:
- "5432:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
healthcheck:
test: [ "CMD", "pg_isready" ]
interval: 5s
timeout: 5s
retries: 10
stop_grace_period: 30s
####################### Flyway Migration Definition #######################
flyway:
container_name: mds_flyway
build:
context: migrations
dockerfile: Dockerfile.flyway.dev
environment:
- FLYWAY_USER=mds
- FLYWAY_HOME=/flyway
- FLYWAY_PASSWORD=test
- FLYWAY_DB_NAME=mds_test
- FLYWAY_DB_HOST=postgres
- FLYWAY_URL=jdbc:postgresql://postgres/mds_test
- FLYWAY_OUT_OF_ORDER=true
- FLYWAY_CONNECT_RETRIES=60
- PLATFORM=ci
depends_on:
- postgres
####################### Backend Definition #######################
backend:
user: root:root # use root in ci as backend coverage file is initially created outside app/
restart: always
container_name: mds_backend
build:
context: services/core-api
env_file: services/core-api/.env-example
ports:
- 5000:5000
volumes:
- ./services/core-api/:/app/
- core_api_logs:/var/log/core-api/
depends_on:
- flyway
- docgen-api
####################### Redis Definition #######################
redis:
image: redis:3.2-alpine
container_name: mds_cache
restart: always
command: redis-server --requirepass redis-password
ports:
- "6379:6379"
####################### Frontend Definition #######################
frontend:
restart: always
container_name: mds_frontend
build:
context: services/core-web
command: [ "npm", "run", "serve" ]
volumes:
- ./services/core-web/src/:/app/src/
ports:
- 3000:3000
env_file: ./services/core-web/.env-example
####################### MineSpace Definition #######################
minespace:
restart: always
container_name: mds_minespace
build:
context: services/minespace-web
command: [ "npm", "run", "serve" ]
volumes:
- ./services/minespace-web/src/:/app/src/
ports:
- 3020:3020
env_file: ./services/minespace-web/.env-example
####################### DOCUMENT_GENERATION Definition #######################
docgen-api:
restart: always
container_name: docgen_api
image: bcgovimages/common-document-generation-service:2.4.1
command: [ "npm", "run", "start" ]
environment:
- SERVER_PORT=3030
- APP_PORT=3030
- CACHE_DIR=/tmp/tmp-reports
- NODE_ENV=development
ports:
- 3030:3030
####################### Networks Definition ######################
networks:
default:
driver: "bridge"
####################### Volumes Definition #######################
volumes:
postgres_data: {}
core_api_logs: {}
core_web_logs: {}