-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose-test.yml
164 lines (157 loc) · 6.21 KB
/
docker-compose-test.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
version: "2.1"
networks:
test:
#1. First build both ms-application-manager and ms-pip-application-coordinator - mvn clean package
#2. In a terminal execute: docker-compose -f docker-compose-test.yml up --build
#3. Check if all services are up using the command: docker ps
# Note that the coordinator has hijacked a topic and queue from ms-application-mannager which may lead to odd outcomes
services:
localstack:
image: '${LOCALSTACK_IMAGE}'
environment:
SERVICES: sns, sqs, kms, ssm
HOSTNAME_EXTERNAL: localstack
AWS_DEFAULT_REGION: eu-west-2
volumes:
- ./config/localstack:/docker-entrypoint-initaws.d
healthcheck:
test: [ "CMD", "curl", "http://localhost:4566" ]
ports:
- "4566:4566"
networks:
- test
mongo:
image: '${MONGO_IMAGE}'
command: --replSet rs0 --bind_ip_all
volumes:
- ./config/mongo/init-replicaset.js:/docker-entrypoint-initdb.d/init-replicaset.js
- ./config/mongo/seed.js:/docker-entrypoint-initdb.d/seed.js
expose:
- 27017
ports:
- "27017:27017"
healthcheck:
test: mongo --eval "db.adminCommand('ping')"
interval: 5s
timeout: 5s
retries: 10
networks:
- test
ms-application-manager:
image: '${GITLAB_IMAGE}'
build:
context: .
dockerfile: Dockerfile
expose:
- 8080
ports:
- "9950:8080"
- "5009:5009"
depends_on:
mongo:
condition: service_healthy
localstack:
condition: service_healthy
environment:
- V3_CREATE_TRUSTSTORE=false
- DOMAIN_SUFFIX=localstack
- COMMON_NAME=http://localstack:8080
- CIS_ROOT_CA=cis_ca_cert
- SPRING_DATA_MONGODB_URI=mongodb://mongo:27017/pip-apply-application-mgr
- SPRING_CONFIG_ACTIVE_PROFILE_ON=dev
- PIP_APPLICATION_ACTIVE_DURATION=90
- PIP_COORDINATOR_BASE_URL=http://ms-pip-application-coordinator:8080
- FEATURE_ENCRYPTION_DATA_ENABLED=true
- FEATURE_ENCRYPTION_MESSAGING_ENABLED=false
- FEATURE_DATA_CHANGESTREAM_ENABLED=true
- FEATURE_CHANGESTREAM_DECRYPTION_ENABLED=false
- UK_GOV_DWP_HEALTH_CHANGESTREAM_CHANNELS[0]_COLLECTION=application
- UK_GOV_DWP_HEALTH_CHANGESTREAM_CHANNELS[0]_ROUTING_KEY=pip.app.mgr.stream
- UK_GOV_DWP_HEALTH_CHANGESTREAM_CHANNELS[0]_DATABASE=pip-apply-application-mgr
- UK_GOV_DWP_HEALTH_INTEGRATION_OUTBOUND_TOPIC_EXCHANGE=pip-app-analytics
- UK_GOV_DWP_HEALTH_INTEGRATION_MESSAGING_TYPE=aws
- UK_GOV_DWP_HEALTH_INTEGRATION_SNS_ENDPOINT_OVERRIDE=http://localstack:4566
- UK_GOV_DWP_HEALTH_INTEGRATION_SQS_ENDPOINT_OVERRIDE=http://localstack:4566
- UK_GOV_DWP_HEALTH_INTEGRATION_ENABLED=true
- UK_GOV_DWP_HEALTH_INTEGRATION_AWS_REGION=eu-west-2
- APPLICATION_TRACING_ENABLED=true
- EVENT_OUTBOUND_TOPIC_EXCHANGE=pipcs-registration-topic
- EVENT_OUTBOUND_ROUTING_KEY=pipcs-registration
- EVENT_INBOUND_TOPIC_NAME=pip-apply-topic-FOR-DELETION
- EVENT_INBOUND_ROUTING_KEY_REGISTRATION_RESPONSE=registration-response-routing-key
- EVENT_INBOUND_QUEUE_NAME_REGISTRATION_RESPONSE=pip-registration-response
- AWS_ACCESS_KEY_ID=test
- AWS_SECRET_ACCESS_KEY=test
- AWS_ENCRYPTION_MESSAGE_DATA_KEY_ID=alias/test_event_request_id
- PIP_BANK_VALIDATION_BASE_URL=http://wm-external-services:8080/api
- PIP_BANK_VALIDATION_CONSUMER_ID=123123
- PIP_BANK_VALIDATION_TLS_ENABLED=false
- PIP_BANK_VALIDATION_TRUST_STORE=trustStore.jks
- PIP_BANK_VALIDATION_TRUST_STORE_PASSWORD=
- PIP_BANK_VALIDATION_KEY_STORE=keyStore.jks
- PIP_BANK_VALIDATION_KEY_STORE_PASSWORD=
- PIP_BANK_VALIDATION_PROXY_ENABLED=false
- PIP_BANK_VALIDATION_PROXY_HOST=
- PIP_BANK_VALIDATION_PROXY_PORT=1
# below var should not be needed, asa app-level FLE encryption should be removed in favour of wireTiger
- AWS_ENCRYPTION_KMS_OVERRIDE=http://localstack:4566
- AWS_ENCRYPTION_MONGO_DATA_KEY_ID=alias/test_mongo_request_id
- AWS_ENCRYPTION_KMS_KEY_CACHE=true
- LOGGING_LEVEL_UK_GOV_DWP_HEALTH=INFO
- LOGGING_LEVEL_UK_GOV_DWP_HEALTH_MONGO_CHANGESTREAM_COMPONENT=INFO
networks:
- test
wm-external-services:
image: '${MOCK_IMAGE}'
container_name: wm-external-services
expose:
- 8080
ports:
- "8950:8080"
command: --global-response-templating --verbose
networks:
- test
ms-pip-application-coordinator:
build:
context: ../ms-pip-application-coordinator
dockerfile: Dockerfile
depends_on:
mongo:
condition: service_healthy
localstack:
condition: service_healthy
ms-application-manager:
condition: service_started
expose:
- 8080
ports:
- "9990:8080"
- "5099:5099"
entrypoint:
- java
- -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:5099
- -jar
- /ms-pip-application-coordinator.jar
environment:
- SPRING_DATA_MONGODB_URI=mongodb://mongo:27017
- SPRING_DATA_MONGODB_DATABASE=pip-application-coordinator
- AWS_ENCRYPTION_DATA_KEY=alias/test_event_request_id
- CDC_TOPIC=stream-topic
- FEATURE_DATA_CHANGESTREAM_ENABLED=false
- FEATURE_CHANGESTREAM_DECRYPTION_ENABLED=false
- UK_GOV_DWP_HEALTH_CHANGESTREAM_CHANNELS[0]_COLLECTION=application
- UK_GOV_DWP_HEALTH_CHANGESTREAM_CHANNELS[0]_ROUTING_KEY=pip.app.coordinator.stream
- UK_GOV_DWP_HEALTH_CHANGESTREAM_CHANNELS[0]_DATABASE=pip-application-coordinator
- UK_GOV_DWP_HEALTH_APPLICATION-MANAGER_BASE-URI=http://ms-application-manager:8080
- AWS_ACCESS_KEY_ID=DUMMY_KEY
- AWS_SECRET_ACCESS_KEY=DUMMY_KEY
- UK_GOV_DWP_HEALTH_INTEGRATION_ENABLED=true
- UK_GOV_DWP_HEALTH_INTEGRATION_AWS-REGION=eu-west-2
- UK_GOV_DWP_HEALTH_INTEGRATION_SQS-ENDPOINT-OVERRIDE=http://localstack:4566
- UK_GOV_DWP_HEALTH_INTEGRATION_SNS-ENDPOINT-OVERRIDE=http://localstack:4566
- UK_GOV_DWP_HEALTH_INTEGRATION_OUTBOUND-TOPIC-EXCHANGE=pipcs-registration-topic
- PIP_APPLICATION_COORDINATOR_EVENT_INBOUND-STATE_QUEUE=pip-registration-response
- AWS_ENCRYPTION_MESSAGE-DATA-KEY-ID=alias/test_mongo_request_id
- AWS_ENCRYPTION_REGION=eu-west-2
networks:
- test