-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
151 lines (145 loc) · 5.23 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
version: "2.1"
networks:
test:
services:
localstack:
image: '${LOCALSTACK_IMAGE}'
environment:
SERVICES: sns, sqs, kms, ssm
HOSTNAME_EXTERNAL: localstack
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"
networks:
- test
ms-application-manager:
image: '${GITLAB_IMAGE}'
build:
context: .
dockerfile: Dockerfile
expose:
- 8080
ports:
- "9950:8080"
- "5009:5009"
depends_on:
mongo:
condition: service_started
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=us-east-1
- 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
entrypoint:
- java
- -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:5009
- -jar
- /ms-application-manager.jar
api-test:
container_name: api-test
image: '${MAVEN_IMAGE}'
entrypoint: /bin/bash -c
command:
- |
until [ `curl -s -o /dev/null -w "%{http_code}" http://ms-application-manager:8080/actuator/health` = "200" ]; do echo "service not available, sleeping 10."; sleep 10; done
sleep 30
mvn ${MVN_OPTS} -Dmaven.failsafe.debug="-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:5005" verify -Papi-component-tests
ports:
- "5005:5005"
working_dir: /usr/src
environment:
AWS_ACCESS_KEY: aws-access-key
AWS_SECRET_KEY: aws-secret-key
HOST: http://ms-application-manager
PORT: 8080
MONGODB_HOST: mongo
MONGO_PORT: 27017
PIP_BANK_VALIDATION_BASE_URL: http://wm-external-services:8080/api
volumes:
- .:/usr/src
- ${MVN_M2}:/root/.m2
- ${MVN_SETTINGS_FILE}:/root/.m2/settings.xml
- ./target/test/reports:/usr/src/target/test-reports
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:
image: '${MOCK_IMAGE}'
container_name: ms-pip-application-coordinator
expose:
- 8080
ports:
- "9990:8080"
command: --global-response-templating --verbose
networks:
- test