-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.yml
274 lines (253 loc) · 6.16 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
x-db_healthcheck: &db_healthcheck
healthcheck:
test: [ "CMD", "healthcheck.sh", "--connect", "--innodb_initialized" ]
start_period: 10s
interval: 10s
timeout: 5s
retries: 3
services:
db:
image: mariadb:10
environment:
MYSQL_ROOT_PASSWORD: r00tp@ss!
MYSQL_DATABASE: pwmgr
MYSQL_USER: idpmgmt
MYSQL_PASSWORD: idpmgmt
<<: *db_healthcheck
testDb:
image: mariadb:10
environment:
MYSQL_ROOT_PASSWORD: r00tp@ss!
MYSQL_DATABASE: test
MYSQL_USER: idpmgmt
MYSQL_PASSWORD: idpmgmt
<<: *db_healthcheck
phpmyadmin:
image: phpmyadmin:5
ports:
- "51151:80"
environment:
PMA_HOST: db
PMA_USER: idpmgmt
PMA_PASSWORD: idpmgmt
api:
build: ./
volumes:
- ./application:/data
ports:
- "51155:80"
depends_on:
db:
condition: service_healthy
email:
condition: service_started
env_file:
- ./common.env
- ./local.env
apitest:
build: ./
volumes:
- ./application:/data
depends_on:
testDb:
condition: service_healthy
zxcvbn:
condition: service_started
broker:
condition: service_healthy
env_file:
- ./common.env
- ./test.env
environment:
MYSQL_HOST: testDb
MYSQL_DATABASE: test
APP_ENV: test
ID_BROKER_baseUrl: http://broker
command: [ "/data/run-tests-api.sh" ]
unittest:
build: ./
volumes:
- ./application:/data
- ./dockerbuild/dev-ldap.conf:/etc/ldap/ldap.conf
depends_on:
db:
condition: service_healthy
zxcvbn:
condition: service_started
env_file:
- ./common.env
- ./test.env
environment:
MYSQL_HOST: testDb
MYSQL_DATABASE: test
APP_ENV: test
ID_BROKER_baseUrl: http://broker
command: [ "/data/run-tests.sh" ]
integrationtest:
build: ./
volumes:
- ./application:/data
- ./dockerbuild/dev-ldap.conf:/etc/ldap/ldap.conf
depends_on:
testDb:
condition: service_healthy
zxcvbn:
condition: service_started
env_file:
- ./common.env
- ./test.env
- ./local.env
environment:
MYSQL_HOST: testDb
MYSQL_DATABASE: test
APP_ENV: test
ID_BROKER_baseUrl: http://broker
command: [ "/data/run-tests-integration.sh" ]
cli:
build: ./
volumes:
- ./application:/data
- ${COMPOSER_CACHE_DIR}:/composer
depends_on:
testDb:
condition: service_healthy
working_dir: /data
user: "${DOCKER_UIDGID}"
env_file:
- ./common.env
- ./local.env
command: [ "true" ]
email:
image: silintl/email-service:1
platform: linux/amd64
depends_on:
emaildb:
condition: service_healthy
emailcron:
condition: service_started
environment:
MYSQL_HOST: emaildb
env_file:
- ./email.common.env
- ./email.local.env
ports:
- "51153:80"
emailcron:
image: silintl/email-service:1
depends_on:
emaildb:
condition: service_healthy
environment:
MYSQL_HOST: emaildb
env_file:
- ./email.common.env
- ./email.local.env
command: /data/run-cron.sh
emaildb:
image: mariadb:10
env_file:
- ./email.common.env
environment:
MYSQL_ROOT_PASSWORD: not-a-secret
<<: *db_healthcheck
emailpma:
image: phpmyadmin:5
ports:
- "51152:80"
environment:
PMA_HOST: emaildb
PMA_USER: email
PMA_PASSWORD: email
zxcvbn:
image: wcjr/zxcvbn-api:1.1.0
platform: linux/amd64
brokerDb:
image: mariadb:10
environment:
MYSQL_ROOT_PASSWORD: r00tp@ss!
MYSQL_DATABASE: broker
MYSQL_USER: broker
MYSQL_PASSWORD: broker
<<: *db_healthcheck
brokerpma:
image: phpmyadmin:5
ports:
- "51158:80"
environment:
PMA_HOST: brokerDb
PMA_USER: broker
PMA_PASSWORD: broker
broker:
image: silintl/idp-id-broker:6
platform: linux/amd64
ports:
- "51154:80"
depends_on:
brokerDb:
condition: service_healthy
volumes:
- ./dockerbuild/broker/run-broker.sh:/data/run-broker.sh
- ./dockerbuild/broker/m381901_235959_insert_test_data.php:/data/console/migrations/m381901_235959_insert_test_data.php
- ./dockerbuild/broker/User.php:/data/console/migrations/User.php
- ./dockerbuild/broker/Method.php:/data/console/migrations/Method.php
environment:
EMAIL_SERVICE_accessToken: fake
EMAIL_SERVICE_assertValidIp: "false"
EMAIL_SERVICE_baseUrl: fake
EMAIL_SERVICE_validIpRanges: 10.0.0.0/128
EMAILER_CLASS: \Sil\SilIdBroker\Behat\Context\fakes\FakeEmailer
IDP_NAME: idp1
MYSQL_HOST: brokerDb
MYSQL_DATABASE: broker
MYSQL_USER: broker
MYSQL_PASSWORD: broker
API_ACCESS_KEYS: abc123
HELP_CENTER_URL: https://example.com/#/help
PASSWORD_FORGOT_URL: https://example.com/#/forgot
PASSWORD_PROFILE_URL: https://example.com/#/profile
SUPPORT_EMAIL: [email protected]
EMAIL_SIGNATURE: Dummy Signature for Tests
APP_ENV: test
MFA_TOTP_apiBaseUrl: not_needed_here
MFA_TOTP_apiKey: not_needed_here
MFA_TOTP_apiSecret: not_needed_here
MFA_WEBAUTHN_apiBaseUrl: not_needed_here
MFA_WEBAUTHN_apiKey: not_needed_here
MFA_WEBAUTHN_apiSecret: not_needed_here
command: ./run-broker.sh
healthcheck:
test: nc -vz localhost 80
start_period: 1s
interval: 1s
timeout: 5s
retries: 20
ldap:
build: ./dockerbuild/ldap
healthcheck:
test: nc -vz localhost 389
start_period: 1s
interval: 1s
timeout: 5s
retries: 90
ldapload:
build: ./dockerbuild/ldap
depends_on:
ldap:
condition: service_healthy
working_dir: /data
command: ./load_ldap.sh
raml2html:
image: mattjtodd/raml2html
platform: linux/amd64
volumes:
- ./api.raml:/api.raml
- ./api.html:/api.html
command: -i api.raml -o api.html
networks:
default:
driver: bridge
ipam:
driver: default
config:
- subnet: 10.20.31.0/24
gateway: 10.20.31.1