-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
318 lines (312 loc) · 7.6 KB
/
docker-compose.yml
File metadata and controls
318 lines (312 loc) · 7.6 KB
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
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
x-common-variables: &common-variables
KONG_DATABASE: postgres
KONG_PG_DATABASE: kong
KONG_PG_HOST: kong-db
KONG_PG_USER: konguser
KONG_PG_PASSWORD: konguser
secrets:
npm_token:
environment: "NPM_TOKEN"
services:
keycloak:
image: keycloak-quarkus:e2e
container_name: keycloak
build:
context: local/keycloak
dockerfile: Dockerfile
args:
- KC_VERSION=${KC_VERSION:-26.5.3}
depends_on:
kong-db:
condition: service_healthy
environment:
KC_BOOTSTRAP_ADMIN_USERNAME: admin
KC_BOOTSTRAP_ADMIN_PASSWORD: local
# Keycloak 26 Hostname v2: --hostname accepts full URL (host + port + path).
command:
[
"start",
"--optimized",
"--hostname",
"http://keycloak.localtest.me:9081/auth",
"--db-url",
"jdbc:postgresql://kong-db/${KEYCLOAK_DB_NAME:-keycloak}",
"--db-username",
"keycloakuser",
"--db-password",
"keycloakuser",
"--http-enabled",
"true",
"--http-port",
"9081",
"--import-realm",
]
volumes:
- ./local/keycloak/master-realm.json:/opt/keycloak/data/import/master-realm.json
ports:
- 9081:9081
- 9000:9000
networks:
aps-net:
aliases:
- keycloak.localtest.me
healthcheck:
test: timeout 10s bash -c ':> /dev/tcp/localhost/9081'
interval: 5s
timeout: 5s
retries: 5
oauth2-proxy:
image: quay.io/oauth2-proxy/oauth2-proxy:v7.8.1
container_name: oauth2-proxy
command: --alpha-config /oauth2-proxy.yaml --config /oauth2-proxy.cfg
depends_on:
- keycloak
ports:
- 4180:4180/tcp
volumes:
- ./local/oauth2-proxy/oauth2-proxy-local.yaml:/oauth2-proxy.yaml
- ./local/oauth2-proxy/oauth2-proxy-local.cfg:/oauth2-proxy.cfg
restart: unless-stopped
networks:
aps-net:
aliases:
- oauth2proxy.localtest.me
apsportal:
container_name: apsportal
image: apsportal:${APSPORTAL_TAG:-latest}
depends_on:
- keycloak
build:
context: .
dockerfile: ./local/portal/Dockerfile.E2E
secrets:
- npm_token
env_file:
- .env.local
ports:
- 3000:3000
networks:
aps-net:
aliases:
- apsportal.localtest.me
feeder:
container_name: feeder
image: feeder:latest
depends_on:
- oauth2-proxy
build:
context: ./feeds
dockerfile: Dockerfile
secrets:
- npm_token
env_file:
- ./local/feeds/.env.local
restart: on-failure
ports:
- 6000:6000
networks:
aps-net:
aliases:
- feeder.localtest.me
feeder-seeding:
container_name: feeder-seeding
image: feeder:latest
command: ''
entrypoint: sh -c "chmod +x /tmp/init.sh && sh /tmp/init.sh"
restart: on-failure
depends_on:
- feeder
volumes:
- ./local/feeder-init:/tmp
networks:
- aps-net
kong-db:
image: postgres:14
container_name: kong-db
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
restart: on-failure
tty: true
ports:
- 5432:5432
volumes:
- ./local/db/database-init.sql:/docker-entrypoint-initdb.d/1-init.sql
- ./local/db/keystone-init.sql:/docker-entrypoint-initdb.d/2-init.sql
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 5s
timeout: 5s
retries: 10
networks:
- aps-net
kong-migrations:
image: kong:kong-local
command: kong migrations bootstrap
depends_on:
kong-db:
condition: service_healthy
environment:
<<: *common-variables
KONG_DNS_ORDER: 'LAST,A'
networks:
- aps-net
restart: on-failure
build:
context: local/kong
dockerfile: Dockerfile
kong-migrations-up:
image: kong:kong-local
command: kong migrations up && kong migrations finish
depends_on:
kong-db:
condition: service_healthy
kong-migrations:
condition: service_completed_successfully
environment:
<<: *common-variables
KONG_DNS_ORDER: 'LAST,A'
networks:
- aps-net
restart: on-failure
kong:
image: kong:kong-local
container_name: kong
depends_on:
- kong-migrations
- kong-migrations-up
environment:
<<: *common-variables
KONG_DEBUG_LEVEL: debug
KONG_ADMIN_ACCESS_LOG: /dev/stdout
KONG_ADMIN_ERROR_LOG: /dev/stderr
KONG_CASSANDRA_CONTACT_POINTS: kong-db
KONG_NGINX_WORKER_PROCESSES: '1'
KONG_PROXY_ACCESS_LOG: /dev/stdout
KONG_PROXY_ERROR_LOG: /dev/stderr
KONG_ADMIN_LISTEN: 0.0.0.0:8001
KONG_DNS_ORDER: 'LAST,A'
KONG_TRUSTED_IPS: '0.0.0.0/0,::/0'
KONG_REAL_IP_HEADER: X-Forwarded-For
ports:
- 8000:8000
- 8001:8001
networks:
aps-net:
aliases:
- kong.localtest.me
restart: on-failure:5
redis:
image: bitnami/redis:latest
container_name: redis-master
environment:
- REDIS_PASSWORD=s3cr3t
restart: on-failure
ports:
- 6379:6379
networks:
aps-net:
aliases:
- redis-master
gwa-api:
image: gwa-api:${GWA_API_TAG:-e2e}
container_name: gwa-api
entrypoint: sh -c "chmod +x /tmp/gwa/entrypoint.sh && sh /tmp/gwa/entrypoint.sh"
ports:
- 2000:2000
env_file:
- ./local/gwa-api/.env.local
restart: on-failure:5
volumes:
- ./local/gwa-api:/tmp/gwa
networks:
aps-net:
aliases:
- gwa-api.localtest.me
cypress-jwks-url:
build:
context: ./local/cypress-jwks-url
dockerfile: Dockerfile
secrets:
- npm_token
volumes:
- ./local/cypress-jwks-url:/src
command: npm start
ports:
- '3500:3500'
networks:
aps-net:
aliases:
- cypress-jwks-url.localtest.me
cypress:
image: aps-cypress-e2e:latest
container_name: cypress-e2e
entrypoint: sh -c "chmod +x /tmp/entrypoint.sh && /tmp/entrypoint.sh"
environment:
- BROWSER=edge
- CYPRESS_RECORD_KEY=${CY_RECORD_KEY:-}
- CYPRESS_PROJECT_ID=${CY_PROJECT_ID:-}
- RUN_ENV=${CY_EXECUTION_ENV:-}
- COMMIT_INFO_BRANCH=${CY_COMMIT_BRANCH:-}
- COMMIT_INFO_SHA=${CY_COMMIT_SHA:-}
- COMMIT_INFO_AUTHOR=${CY_COMMIT_AUTHOR:-}
- COMMIT_INFO_MESSAGE=${CY_COMMIT_MESSAGE:-}
- COMMIT_INFO_REMOTE=${CY_REPO_URL:-}
- COMMIT_INFO_EMAIL=${CY_COMMIT_AUTHOR_EMAIL:-}
depends_on:
- feeder-seeding
build:
context: .
dockerfile: e2e/Dockerfile
secrets:
- npm_token
volumes:
- ./e2e/coverage:/e2e/coverage
- ./e2e/results:/e2e/results
networks:
- aps-net
profiles:
- testsuite
astra-mongo:
image: mongo:4
container_name: astra-mongo
ports:
- '27017:27017'
networks:
aps-net:
aliases:
- mongo.localtest.me
profiles:
- testsuite
astra-gui:
build:
context: local/astra
container_name: astra-gui
restart: always
environment:
MONGO_PORT_27017_TCP_ADDR: astra-mongo
networks:
aps-net:
aliases:
- astra.localtest.me
depends_on:
- astra-mongo
links:
- astra-mongo:mongo
ports:
- '8094:8094'
profiles:
- testsuite
mailpit:
image: axllent/mailpit:latest
container_name: mailpit
restart: unless-stopped
ports:
- '1025:1025' # SMTP port for receiving emails
- '8025:8025' # Web UI for viewing emails
networks:
aps-net:
aliases:
- mailpit.localtest.me
networks:
aps-net: {}