-
Notifications
You must be signed in to change notification settings - Fork 4
/
docker-compose.yml
285 lines (259 loc) · 7.35 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
volumes:
esbuild:
services:
# ---------------------------
# Asset build
esbuild:
container_name: esbuild
build:
context: .
dockerfile: service-front/web/Dockerfile
entrypoint: >
sh -c "npm ci --verbose && npm run build"
volumes:
- ./service-front/web:/web:rw
- esbuild:/web/dist
# ---------------------------
# Viewer Front
viewer-web:
container_name: viewer-web
build:
context: .
dockerfile: service-front/docker/web/Dockerfile
volumes:
- esbuild:/web
environment:
WEB_DOMAIN: http://localhost:9001
APP_HOST: viewer-app
APP_PORT: 9000
NGINX_LOG_LEVEL: warn
depends_on:
- esbuild
- viewer-app
viewer-app:
container_name: viewer-app
build:
target: development
context: .
dockerfile: service-front/docker/app/Dockerfile
volumes:
- ./service-front/app:/app
- esbuild:/app/assets
environment:
# Always required
CONTEXT: "viewer"
GOOGLE_ANALYTICS_ID: "UA-170469426-2"
KMS_SESSION_CMK_ALIAS: "alias/viewer-sessions-cmk-alias"
# Feature flags
INSTRUCTIONS_AND_PREFERENCES: "true"
# Local only
API_SERVICE_URL:
PDF_SERVICE_URL:
AWS_ENDPOINT_KMS:
AWS_ACCESS_KEY_ID: "devkey"
AWS_SECRET_ACCESS_KEY: "secretdevkey"
LOGGING_LEVEL: "100" # \Monolog\Logger::DEBUG
ENABLE_XDEBUG: "true"
PHP_IDE_CONFIG: serverName=viewer-app
XDEBUG_CONFIG: client_host=host.docker.internal client_port=9000
XDEBUG_MODE: develop,debug,coverage
SESSION_EXPIRES: 30 # session expiry length to support timeout message.
COOKIE_EXPIRES: 1440 # cookie expiry for complete logout - initial value to be 24 hours.
SUPPORT_DATASTORE_LPAS: "false"
depends_on:
- api-web
# ---------------------------
# Actor Front
actor-web:
container_name: actor-web
build:
context: .
dockerfile: service-front/docker/web/Dockerfile
volumes:
- esbuild:/web
environment:
WEB_DOMAIN: http://localhost:9002
APP_HOST: actor-app
APP_PORT: 9000
NGINX_LOG_LEVEL: warn
depends_on:
- esbuild
- actor-app
actor-app:
container_name: actor-app
build:
target: development
context: .
dockerfile: service-front/docker/app/Dockerfile
volumes:
- ./service-front/app:/app
- esbuild:/app/assets
environment:
# Always required
CONTEXT: "actor"
GOOGLE_ANALYTICS_ID: "UA-170469426-1"
KMS_SESSION_CMK_ALIAS: "alias/viewer-sessions-cmk-alias"
# Feature flags
DELETE_LPA_FEATURE: "true"
ALLOW_MERIS_LPAS: "false"
INSTRUCTIONS_AND_PREFERENCES: "true"
ALLOW_GOV_ONE_LOGIN: "true"
SUPPORT_DATASTORE_LPAS: "false"
# Local only
API_SERVICE_URL:
AWS_ENDPOINT_KMS:
AWS_ACCESS_KEY_ID: "devkey"
AWS_SECRET_ACCESS_KEY: "secretdevkey"
LOGGING_LEVEL: "100" # \Monolog\Logger::DEBUG
ENABLE_XDEBUG: "true"
PHP_IDE_CONFIG: serverName=actor-app
XDEBUG_CONFIG: client_host=host.docker.internal client_port=9000
XDEBUG_MODE: develop,debug,coverage
SESSION_EXPIRES: 20 # session expiry length to support timeout message.
SESSION_EXPIRY_WARNING: 5 # session expiry warning time to trigger popup window.
COOKIE_EXPIRES: 1440 # cookie expiry for complete logout - initial value to be 24 hours.
NOTIFY_API_KEY:
depends_on:
- api-web
# ---------------------------
# Front Composer (Shared)
front-composer:
profiles:
- tools
build:
target: development
context: .
dockerfile: service-front/docker/app/Dockerfile
volumes:
- ./service-front/app:/app
entrypoint:
- /usr/bin/composer
command:
- install
- --prefer-dist
- --no-suggest
- --no-interaction
- --no-scripts
- --optimize-autoloader
# ---------------------------
# API
api-web:
container_name: api-web
build:
context: .
dockerfile: service-api/docker/web/Dockerfile
volumes:
- ./service-api/web/dist:/web
ports:
- 9010:80
environment:
APP_HOST: api-app
APP_PORT: 9000
NGINX_LOG_LEVEL: warn
depends_on:
- api-app
api-app:
container_name: api-app
build:
target: development
context: .
dockerfile: service-api/docker/app/Dockerfile
volumes:
- ./service-api/app:/app
environment:
DYNAMODB_TABLE_ACTOR_CODES: "ActorCodes"
DYNAMODB_TABLE_ACTOR_USERS: "ActorUsers"
DYNAMODB_TABLE_VIEWER_CODES: "ViewerCodes"
DYNAMODB_TABLE_VIEWER_ACTIVITY: "ViewerActivity"
DYNAMODB_TABLE_USER_LPA_ACTOR_MAP: "UserLpaActorMap"
DYNAMODB_TABLE_STATS: "Stats"
SIRIUS_API_ENDPOINT:
LPA_CODES_API_ENDPOINT:
IAP_IMAGES_API_ENDPOINT:
ONE_LOGIN_CLIENT_ID: "client-id"
ONE_LOGIN_DISCOVERY_URL:
# Feature flags
ALLOW_MERIS_LPAS: "false"
INSTRUCTIONS_AND_PREFERENCES: "true"
ALLOW_GOV_ONE_LOGIN: "true"
SUPPORT_DATASTORE_LPAS: "false"
# Local only
AWS_ACCESS_KEY_ID: "devkey"
AWS_ENDPOINT_DYNAMODB:
AWS_ENDPOINT_SECRETSMANAGER:
AWS_ENDPOINT_SSM:
AWS_SECRET_ACCESS_KEY: "secretdevkey"
LPA_CODES_STATIC_AUTH_TOKEN: asdf1234567890
PACT_BROKER_PUBLISH: "false"
LOGGING_LEVEL: "100" # \Monolog\Logger::DEBUG
ENABLE_XDEBUG: "true"
PHP_IDE_CONFIG: serverName=api-app
XDEBUG_CONFIG: client_host=host.docker.internal client_port=9000
XDEBUG_MODE: develop,debug,coverage
NOTIFY_API_KEY:
api-composer:
profiles:
- tools
build:
target: development
context: .
dockerfile: service-api/docker/app/Dockerfile
volumes:
- ./service-api/app:/app
entrypoint:
- /usr/bin/composer
command:
- install
- --prefer-dist
- --no-interaction
- --no-scripts
- --optimize-autoloader
api-seeding:
container_name: api-seeding
build:
context: .
dockerfile: service-api/docker/seeding/Dockerfile
volumes:
- ./service-api/seeding:/app/seeding
environment:
AWS_ACCESS_KEY_ID: "devkey"
AWS_SECRET_ACCESS_KEY: "secretdevkey"
DYNAMODB_TABLE_ACTOR_CODES: "ActorCodes"
DYNAMODB_TABLE_VIEWER_CODES: "ViewerCodes"
DYNAMODB_TABLE_ACTOR_USERS: "ActorUsers"
DYNAMODB_TABLE_USER_LPA_ACTOR_MAP: "UserLpaActorMap"
DYNAMODB_TABLE_STATS: "Stats"
AWS_ENDPOINT_DYNAMODB:
CODES_ENDPOINT:
# ---------------------------
# Lambda to upload stats
upload-stats-lambda:
container_name: upload-statistics
build:
context: ./lambda-functions/upload-statistics
dockerfile: Dockerfile
environment:
ENVIRONMENT: local
REGION: eu-west-1
AWS_ACCESS_KEY_ID: 'devkey'
AWS_SECRET_ACCESS_KEY: 'secretdevkey'
volumes:
- ./lambda-functions/upload-statistics/app:/function/app
- ./lambda-functions/.aws-lambda-rie:/aws-lambda
ports:
- 9007:8080
proxy:
container_name: proxy
image: traefik:3.0
ports:
- "9001:9001"
- "9041:9041"
- "9002:9002"
- "9042:9042"
- "9080:8080"
volumes:
- ./local-config/proxy/traefik.toml:/etc/traefik/traefik.toml
- ./local-config/proxy/dynamic.toml:/etc/traefik/dynamic.toml
depends_on:
- actor-web
- viewer-web