This repository has been archived by the owner on Jul 5, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
/
docker-compose.yml
351 lines (309 loc) · 9.59 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
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
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
version: '2'
services:
# router:
# image: registry.service.opg.digital/opg-nginx-router-1604:0.0.318
# links:
# - front
# - caseworker
# - api
# - maintenance
# ---------------------------
# Local Services
local-config:
container_name: refunds-local-config
build:
context: .
dockerfile: local-config/Dockerfile
depends_on:
- dynamodb
- postgres
environment:
AWS_ACCESS_KEY_ID: '-'
AWS_SECRET_ACCESS_KEY: '-'
AWS_ENDPOINT_DYNAMODB: dynamodb:8000
postgres:
image: postgres:10.7
env_file:
- ./postgres/local.env
ports:
- 5432:5432
dynamodb:
image: amazon/dynamodb-local
ports:
- 8000:8000
kms:
image: nsmithuk/local-kms:2
volumes:
- ./local-kms:/init
environment:
REGION: eu-west-1
ports:
- 8001:8080
# ---------------------------
# Front
public-web:
container_name: public-front-web
image: public-front-web
depends_on:
- public-app
volumes:
- ./public-front/public:/web
build:
context: ./
dockerfile: public-front/docker/web/Dockerfile
environment:
APP_HOST: public-app
APP_PORT: 9000
NGINX_LOG_LEVEL: warn
public-app:
container_name: public-front-app
image: public-front-app
build:
context: ./
dockerfile: public-front/docker/app/Dockerfile
volumes:
- ./public-front:/app
# depends_on:
# - dynamodb
# - localstack
# - local-config
environment:
OPG_LPA_STACK_NAME: 'local'
OPG_LPA_STACK_ENVIRONMENT: 'dev'
OPG_REFUNDS_PUBLIC_FRONT_SESSION_DYNAMODB_TABLE: 'Sessions'
OPG_REFUNDS_DB_APPLICATIONS_HOSTNAME: 'postgres'
OPG_REFUNDS_DB_APPLICATIONS_PORT: '5432'
OPG_REFUNDS_DB_APPLICATIONS_NAME: 'applications'
OPG_REFUNDS_DB_APPLICATIONS_WRITE_USERNAME: 'applications'
OPG_REFUNDS_DB_APPLICATIONS_WRITE_PASSWORD: 'applications'
# Testing values, deliberately committed.
OPG_REFUNDS_BANK_HASH_SALT: '00000000000000000000000000000000'
OPG_REFUNDS_PUBLIC_FRONT_BETA_LINK_SIGNATURE_KEY: '0000000000000000000000000000000000000000000000000000000000000000'
OPG_REFUNDS_AD_LINK_SIGNATURE_KEY: '0000000000000000000000000000000000000000000000000000000000000000'
OPG_REFUNDS_PUBLIC_FRONT_KMS_ENCRYPT_ENDPOINT: 'http://kms:8080'
OPG_REFUNDS_PUBLIC_FRONT_KMS_ENCRYPT_KEY_ALIAS: 'alias/dev-local-testing'
# Local only
AWS_ACCESS_KEY_ID: '-'
AWS_SECRET_ACCESS_KEY: '-'
OPG_REFUNDS_PUBLIC_FRONT_SESSION_DYNAMODB_ENDPOINT: http://dynamodb:8000
PHP_OPCACHE_VALIDATE_TIMESTAMPS: 1
#ENABLE_XDEBUG: 'true'
PHP_IDE_CONFIG: serverName=public-front-app
XDEBUG_CONFIG: remote_host=host.docker.internal remote_enable=1
# from shell vars
OPG_REFUNDS_NOTIFY_API_KEY: "${OPG_REFUNDS_NOTIFY_API_KEY}"
public-composer:
image: composer
volumes:
- ./public-front:/app
command:
- install
- --prefer-dist
- --no-suggest
- --no-interaction
- --no-scripts
- --optimize-autoloader
public-ssl:
container_name: public-front-ssl
image: fsouza/docker-ssl-proxy
depends_on:
- public-web
ports:
- 9001:443
volumes:
- ./local-ssl/certs:/etc/nginx/certs
environment:
DOMAIN: 'localhost'
TARGET_HOST_HEADER: 'localhost:9001'
SSL_PORT: '443'
TARGET_HOST: 'public-web'
TARGET_PORT: '80'
# ---------------------------
# Caseworker Front
caseworker-front-web:
container_name: caseworker-front-web
image: caseworker-front-web
depends_on:
- caseworker-front-app
volumes:
- ./caseworker-front/public:/web
build:
context: ./
dockerfile: caseworker-front/docker/web/Dockerfile
environment:
APP_HOST: caseworker-front-app
APP_PORT: 9000
NGINX_LOG_LEVEL: warn
caseworker-front-app:
container_name: caseworker-front-app
image: caseworker-front-app
build:
context: ./
dockerfile: caseworker-front/docker/app/Dockerfile
volumes:
- ./caseworker-front:/app
# depends_on:
# - dynamodb
# - localstack
# - local-config
environment:
API_URL: 'http://caseworker-api-web'
OPG_REFUNDS_PUBLIC_FRONT_HOSTNAME: 'localhost:9001'
OPG_REFUNDS_CASEWORKER_FRONT_SESSION_DYNAMODB_TABLE: 'CaseworkerSessions'
# Testing values, deliberately committed.
OPG_REFUNDS_AD_LINK_SIGNATURE_KEY: '0000000000000000000000000000000000000000000000000000000000000000'
# Local only
AWS_ACCESS_KEY_ID: '-'
AWS_SECRET_ACCESS_KEY: '-'
OPG_REFUNDS_CASEWORKER_FRONT_SESSION_DYNAMODB_ENDPOINT: http://dynamodb:8000
PHP_OPCACHE_VALIDATE_TIMESTAMPS: 1
#ENABLE_XDEBUG: 'true'
PHP_IDE_CONFIG: serverName=caseworker-front-app
XDEBUG_CONFIG: remote_host=host.docker.internal remote_enable=1
# from shell vars
OPG_REFUNDS_NOTIFY_API_KEY: "${OPG_REFUNDS_NOTIFY_API_KEY}"
caseworker-front-composer:
image: composer
volumes:
- ./caseworker-front:/app
command:
- install
- --prefer-dist
- --no-suggest
- --no-interaction
- --no-scripts
- --optimize-autoloader
caseworker-front-ssl:
container_name: caseworker-front-ssl
image: fsouza/docker-ssl-proxy
depends_on:
- caseworker-front-web
ports:
- 9002:443
volumes:
- ./local-ssl/certs:/etc/nginx/certs
environment:
DOMAIN: 'localhost'
TARGET_HOST_HEADER: 'localhost:9002'
SSL_PORT: '443'
TARGET_HOST: 'caseworker-front-web'
TARGET_PORT: '80'
# ---------------------------
# Caseworker API
caseworker-api-web:
container_name: caseworker-api-web
image: caseworker-api-web
ports:
- 9003:80
depends_on:
- caseworker-api-app
volumes:
- ./caseworker-api/public:/web
build:
context: ./
dockerfile: caseworker-api/docker/web/Dockerfile
environment:
APP_HOST: caseworker-api-app
APP_PORT: 9000
NGINX_LOG_LEVEL: warn
caseworker-api-app:
container_name: caseworker-api-app
image: caseworker-api-app
build:
context: ./
dockerfile: caseworker-api/docker/app/Dockerfile
volumes:
- ./caseworker-api:/app
depends_on:
- caseworker-api-composer
# - dynamodb
# - localstack
# - local-config
environment:
# Local only
AWS_ACCESS_KEY_ID: '-'
AWS_SECRET_ACCESS_KEY: '-'
OPG_REFUNDS_CASEWORKER_API_KMS_ENDPOINT: 'http://kms:8080'
OPG_REFUNDS_DB_APPLICATIONS_HOSTNAME: 'postgres'
OPG_REFUNDS_DB_APPLICATIONS_PORT: '5432'
OPG_REFUNDS_DB_APPLICATIONS_NAME: 'applications'
OPG_REFUNDS_DB_APPLICATIONS_FULL_USERNAME: 'applications_full'
OPG_REFUNDS_DB_APPLICATIONS_FULL_PASSWORD: 'applications_full'
OPG_REFUNDS_DB_CASES_HOSTNAME: 'postgres'
OPG_REFUNDS_DB_CASES_PORT: '5432'
OPG_REFUNDS_DB_CASES_NAME: 'cases'
OPG_REFUNDS_DB_CASES_FULL_USERNAME: 'cases_full'
OPG_REFUNDS_DB_CASES_FULL_PASSWORD: 'cases_full'
# Testing values, deliberately committed.
OPG_REFUNDS_SSCL_ENTITY: '0123'
OPG_REFUNDS_SSCL_COST_CENTRE: '99999999'
OPG_REFUNDS_SSCL_ACCOUNT: '123450000'
OPG_REFUNDS_SSCL_ANALYSIS: '12345678'
# Testing values, deliberately committed.
OPG_REFUNDS_BANK_HASH_SALT: '00000000000000000000000000000000'
PHP_OPCACHE_VALIDATE_TIMESTAMPS: 1
#ENABLE_XDEBUG: 'true'
PHP_IDE_CONFIG: serverName=caseworker-api-app
XDEBUG_CONFIG: remote_host=host.docker.internal remote_enable=1
# from shell vars
OPG_REFUNDS_NOTIFY_API_KEY: "${OPG_REFUNDS_NOTIFY_API_KEY}"
caseworker-api-composer:
image: caseworker-api-composer
build:
context: ./
dockerfile: caseworker-api/docker/composer/Dockerfile
volumes:
- ./caseworker-api:/app
command:
- install
- --prefer-dist
- --no-suggest
- --no-interaction
- --no-scripts
- --optimize-autoloader
# ---------------------------
# Ingestion
caseworker-api-ingestion:
container_name: caseworker-api-ingestion
image: caseworker-api-ingestion
build:
context: ./
dockerfile: caseworker-api/docker/ingestion/Dockerfile
volumes:
- ./caseworker-api:/app
depends_on:
- caseworker-api-composer
- dynamodb
- local-config
- postgres
env_file:
- ./postgres/local.env
environment:
# Local only
AWS_ACCESS_KEY_ID: '-'
AWS_SECRET_ACCESS_KEY: '-'
# Fake account, deliberately committed.
OPG_REFUNDS_CASEWORKER_ADMIN_NAME: 'Admin User 01'
OPG_REFUNDS_CASEWORKER_ADMIN_USERNAME: '[email protected]'
OPG_REFUNDS_CASEWORKER_ADMIN_PASSWORD: 'pass1234'
OPG_REFUNDS_CASEWORKER_INGESTION_ENABLED: 'true'
OPG_REFUNDS_CRONLOCK_DYNAMODB_TABLE: 'Locks'
OPG_REFUNDS_DYNAMODB_ENDPOINT: http://dynamodb:8000
PHP_OPCACHE_VALIDATE_TIMESTAMPS: 1
ENABLE_XDEBUG: 'true'
PHP_IDE_CONFIG: serverName=caseworker-api-ingestion
XDEBUG_CONFIG: remote_host=host.docker.internal remote_enable=1
# from shell vars
OPG_REFUNDS_NOTIFY_API_KEY: "${OPG_REFUNDS_NOTIFY_API_KEY}"
caseworker-api-seeding:
container_name: caseworker-api-seeding
image: caseworker-api-seeding
build:
context: ./
dockerfile: caseworker-api/docker/seeding/Dockerfile
depends_on:
- caseworker-api-composer
- postgres
env_file:
- ./postgres/local.env
# We mount the same code as caseworker-api-app locally, so no need for a separate composer service.