forked from ministryofjustice/opg-use-an-lpa
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
237 lines (213 loc) · 6.07 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
version: "3.8"
volumes:
webpack_dist:
services:
# ---------------------------
# Webpack Watch for Development
webpack:
container_name: webpack
image: webpack
build:
context: .
dockerfile: service-front/web/Dockerfile
entrypoint: >
sh -c "npm i && npm run build-scss && npm run build:pdf && npm run watch"
volumes:
- ./service-front/web:/web:rw,delegated
- webpack_dist:/dist
# ---------------------------
# Viewer Front
service-pdf:
container_name: service-pdf
image: service-pdf
build:
context: .
dockerfile: service-pdf/docker/app/Dockerfile
ports:
- 9004:80
# ---------------------------
# Viewer Front
viewer-web:
container_name: viewer-web
image: front-web
build:
context: .
dockerfile: service-front/docker/web/Dockerfile
volumes:
- webpack_dist:/web
ports:
- 9001:80
environment:
APP_HOST: viewer-app
APP_PORT: 9000
NGINX_LOG_LEVEL: warn
depends_on:
- webpack
viewer-app:
container_name: viewer-app
image: viewer-app
build:
context: .
dockerfile: service-front/docker/app/Dockerfile
volumes:
- ./service-front/app:/app
- webpack_dist:/app/assets
environment:
# Always required
CONTEXT: "viewer"
GOOGLE_ANALYTICS_ID: "UA-170469426-2"
KMS_SESSION_CMK_ALIAS: "alias/viewer-sessions-cmk-alias"
# Local only
API_SERVICE_URL: http://api-web
PDF_SERVICE_URL: http://service-pdf
AWS_ENDPOINT_KMS: http://kms:8080
AWS_ACCESS_KEY_ID: "-"
AWS_SECRET_ACCESS_KEY: "-"
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.
COOKIE_SECURE: "false"
depends_on:
- redis
# ---------------------------
# Actor Front
actor-web:
container_name: actor-web
image: front-web
build:
context: .
dockerfile: service-front/docker/web/Dockerfile
volumes:
- webpack_dist:/web
ports:
- 9002:80
environment:
APP_HOST: actor-app
APP_PORT: 9000
NGINX_LOG_LEVEL: warn
depends_on:
- webpack
actor-app:
container_name: actor-app
image: actor-app
build:
context: .
dockerfile: service-front/docker/app/Dockerfile
volumes:
- ./service-front/app:/app
- webpack_dist:/app/assets
environment:
# Always required
CONTEXT: "actor"
GOOGLE_ANALYTICS_ID: "UA-170469426-1"
KMS_SESSION_CMK_ALIAS: "alias/viewer-sessions-cmk-alias"
USE_OLDER_LPA_JOURNEY: "true"
# Local only
API_SERVICE_URL: http://api-web
AWS_ENDPOINT_KMS: http://kms:8080
AWS_ACCESS_KEY_ID: "-"
AWS_SECRET_ACCESS_KEY: "-"
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.
COOKIE_SECURE: "false"
# ---------------------------
# Front Composer (Shared)
front-composer:
image: composer
volumes:
- ./service-front/app:/app
command:
- install
- --prefer-dist
- --no-suggest
- --no-interaction
- --no-scripts
- --optimize-autoloader
- --ignore-platform-reqs
# ---------------------------
# API
api-web:
container_name: api-web
image: api-web
build:
context: .
dockerfile: service-api/docker/web/Dockerfile
volumes:
- ./service-api/web/dist:/web
ports:
- 9003:80
environment:
APP_HOST: api-app
APP_PORT: 9000
NGINX_LOG_LEVEL: warn
api-app:
container_name: api-app
image: api-app
build:
context: .
dockerfile: service-api/docker/app/Dockerfile
volumes:
- ./service-api/app:/app
networks:
- default
- lpas-collection
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"
SIRIUS_API_ENDPOINT: "http://api_gateway:4343"
LPA_CODES_API_ENDPOINT: "http://codes-gateway:4343"
# Local only
AWS_ACCESS_KEY_ID: "-"
AWS_ENDPOINT_DYNAMODB: http://localstack:4566
AWS_SECRET_ACCESS_KEY: "-"
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
XDEBUG_TRIGGER: "true"
api-composer:
image: composer
volumes:
- ./service-api/app:/app
command:
- install
- --prefer-dist
- --no-suggest
- --no-interaction
- --no-scripts
- --optimize-autoloader
api-seeding:
container_name: api-seeding
build:
context: .
dockerfile: service-api/docker/seeding/Dockerfile
depends_on:
- localstack
environment:
AWS_ACCESS_KEY_ID: "-"
AWS_SECRET_ACCESS_KEY: "-"
DYNAMODB_TABLE_ACTOR_CODES: "ActorCodes"
DYNAMODB_TABLE_VIEWER_CODES: "ViewerCodes"
DYNAMODB_TABLE_ACTOR_USERS: "ActorUsers"
DYNAMODB_TABLE_USER_LPA_ACTOR_MAP: "UserLpaActorMap"
AWS_ENDPOINT_DYNAMODB: localstack:4566
CODES_ENDPOINT: codes-gateway:4343
networks:
lpas-collection:
driver: bridge