-
Notifications
You must be signed in to change notification settings - Fork 4
/
docker-compose.dependencies.yml
179 lines (164 loc) · 4.73 KB
/
docker-compose.dependencies.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
services:
# -----
# Service overrides for dependency startup ordering
viewer-app:
environment:
API_SERVICE_URL: http://api-web
PDF_SERVICE_URL: http://service-pdf
AWS_ENDPOINT_KMS: http://kms:8080
depends_on:
- redis
- service-pdf
actor-app:
environment:
API_SERVICE_URL: http://api-web
AWS_ENDPOINT_KMS: http://kms:8080
depends_on:
- redis
api-app:
depends_on:
codes-gateway:
condition: service_started
dynamodb-local:
condition: service_started
kms:
condition: service_started
localstack:
condition: service_healthy
mock-one-login:
condition: service_started
restart: true
environment:
SIRIUS_API_ENDPOINT: http://api-gateway:5000
LPA_CODES_API_ENDPOINT: http://codes-gateway:4343
IAP_IMAGES_API_ENDPOINT: http://api-gateway:5000
ONE_LOGIN_DISCOVERY_URL: http://mock-one-login:8080/.well-known/openid-configuration
AWS_ENDPOINT_DYNAMODB: http://dynamodb-local:8000
AWS_ENDPOINT_SECRETSMANAGER: http://localstack:4566
AWS_ENDPOINT_SSM: http://localstack:4566
LPA_DATA_STORE_ENDPOINT: http://mock-lpa-data-store:4014
api-seeding:
depends_on:
- dynamodb-local
environment:
AWS_ENDPOINT_DYNAMODB: dynamodb-local:8000
CODES_ENDPOINT: codes-gateway:4343
# -----
# Database
dynamodb-local:
command: "-jar DynamoDBLocal.jar -sharedDb"
image: "amazon/dynamodb-local:latest"
container_name: dynamodb-local
ports:
- 8000:8000
# -----
# Code Generation API development environment
codes-gateway:
build:
context: ../opg-data-lpa-codes/lambda_functions/v1
dockerfile: Dockerfile-Local-Helper
ports:
- 4343:4343
volumes:
- ../opg-data-lpa-codes/lambda_functions/v1/:/var/www/lambda_functions/v1/
depends_on:
- dynamodb-local
environment:
LOCAL_URL: host.docker.internal #rather than host name as the port is hardcoded to 8000
ENVIRONMENT: local
AWS_ACCESS_KEY_ID: testing
AWS_SECRET_ACCESS_KEY: testing
AWS_SECURITY_TOKEN: testing
AWS_SESSION_TOKEN: testing
AWS_DEFAULT_REGION: eu-west-1
# ---------------------------
# Cache service
redis:
image: redis:7
# ---------------------------
# AWS KMS mock service
kms:
image: nsmithuk/local-kms:3
volumes:
- ./local-config/kms:/init
environment:
KMS_REGION: eu-west-1
KMS_SEED_PATH: /init/kms-seed.yaml
# ---------------------------
# PDF Generator
service-pdf:
container_name: service-pdf
image: 311462405659.dkr.ecr.eu-west-1.amazonaws.com/pdf-service:v1.361.0
ports:
- 9004:80
# ---------------------------
# Sirius gateway mock
api-gateway:
container_name: api-gateway
image: nginx:stable-alpine
depends_on:
- mock-data-lpa
- mock-image-request-handler
ports:
- "4010:5000"
volumes:
- ./mock-integrations/nginx.conf:/etc/nginx/conf.d/default.conf
- ./mock-integrations/image-request-handler/mocked-images:/var/www/html:ro
mock-data-lpa:
container_name: mock-data-lpa
image: stoplight/prism:5
command:
- "mock"
- "-h"
- "0.0.0.0"
- "/tmp/openapi.yaml"
ports:
- "4011:4010"
volumes:
- ./mock-integrations/opg-data-lpa/mock-openapi.yaml:/tmp/openapi.yaml:ro
mock-image-request-handler:
container_name: mock-image-request-handler
image: outofcoffee/imposter:4.0.3
command:
- "-c"
- "/opt/imposter/config"
- "-l"
- "4012"
ports:
- "4012:4012"
volumes:
- ./mock-integrations/image-request-handler:/opt/imposter/config:ro
mock-lpa-data-store:
container_name: mock-lpa-data-store
image: outofcoffee/imposter:4.0.3
command:
- "-c"
- "/opt/imposter/config"
- "-l"
- "4014"
ports:
- "4014:4014"
volumes:
- ./mock-integrations/lpa-data-store:/opt/imposter/config:ro
localstack:
container_name: localstack
image: localstack/localstack
ports:
- "4566:4566"
environment:
- DEBUG=1
volumes:
- ./mock-integrations/secrets-manager/localstack_init.sh:/etc/localstack/init/ready.d/init-aws.sh
- ./mock-integrations/secrets-manager/private_key.pem:/private_key.pem
- ./mock-integrations/secrets-manager/public_key.pem:/public_key.pem
mock-one-login:
container_name: mock-one-login
image: 311462405659.dkr.ecr.eu-west-1.amazonaws.com/mock-onelogin
ports:
- "4013:8080"
environment:
PUBLIC_URL: http://localhost:4013
INTERNAL_URL: http://mock-one-login:8080
REDIRECT_URL: https://localhost:9042/home/login
CLIENT_ID: client-id
TEMPLATE_SUB: 1