-
Notifications
You must be signed in to change notification settings - Fork 7
/
docker-compose.yml
275 lines (270 loc) · 6.52 KB
/
docker-compose.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
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
version: '3.8'
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
services:
keycloak:
image: quay.io/keycloak/keycloak:15.1.1
container_name: keycloak
hostname: keycloak
depends_on:
- kong-db
command:
[
'-b',
'0.0.0.0',
'-Djboss.socket.binding.port-offset=1001',
'-Dkeycloak.migration.action=import',
'-Dkeycloak.migration.provider=singleFile',
'-Dkeycloak.migration.file=/tmp/realm-config/master-realm.json',
'-Dkeycloak.migration.strategy=OVERWRITE_EXISTING',
'-Dkeycloak.profile.feature.upload_scripts=enabled',
]
ports:
- 9081:9081/tcp
environment:
#KEYCLOAK_USER: local
#KEYCLOAK_PASSWORD: local
DB_VENDOR: POSTGRES
DB_SCHEMA: public
DB_ADDR: kong-db:5432
DB_USER: keycloakuser
DB_PASSWORD: keycloakuser
volumes:
- ./local/keycloak/master-realm.json:/tmp/realm-config/master-realm.json
networks:
aps-net:
aliases:
- keycloak.localtest.me
oauth2-proxy:
image: quay.io/oauth2-proxy/oauth2-proxy:v7.2.0
container_name: oauth2-proxy
command: --config ./oauth2-proxy.cfg
depends_on:
- keycloak
ports:
- 4180:4180/tcp
volumes:
- ./local/oauth2-proxy/oauth2-proxy-local.cfg:/oauth2-proxy.cfg
restart: unless-stopped
env_file:
- .env.local
networks:
aps-net:
aliases:
- oauth2proxy.localtest.me
apsportal:
container_name: apsportal
image: apsportal:latest
depends_on:
- keycloak
build:
context: .
dockerfile: ./local/portal/Dockerfile.E2E
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
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:12.8
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
networks:
- aps-net
kong-migrations:
image: kong:kong-local
command: kong migrations bootstrap
depends_on:
- kong-db
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
- kong-migrations
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: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
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
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
networks:
aps-net: {}