-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathcompose.yml
More file actions
119 lines (112 loc) · 3.75 KB
/
compose.yml
File metadata and controls
119 lines (112 loc) · 3.75 KB
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
name: btms-gateway-localstack
services:
localstack:
container_name: "gateway-sns-sqs-emulator"
image: localstack/localstack:4.3.0
ports:
- "4566:4566"
- "4510-4559:4510-4559"
env_file:
- 'compose/aws.env'
environment:
SERVICES: sns,sqs
volumes:
- '${TMPDIR:-/tmp}/localstack:/var/lib/localstack'
- ./compose/start-localstack.sh:/etc/localstack/init/ready.d/start-localstack.sh
healthcheck:
test: cat /tmp/ready
interval: 5s
start_period: 5s
retries: 10
wiremock:
container_name: gateway-wiremock
environment:
TZ: Europe/London
image: sheyenrath/wiremock.net:latest
ports:
- "9090:80"
volumes:
- './compose/wiremock/mappings:/app/__admin/mappings'
command:
- '--ReadStaticMappings true'
mongodb:
image: mongo:6.0.13
command: [ "--replSet", "rs0", "--bind_ip_all", "--port", "27017" ]
ports:
- "27017:27017"
extra_hosts:
- "host.docker.internal:host-gateway"
healthcheck:
test: echo "try { rs.status() } catch (err) { rs.initiate({_id:'rs0',members:[{_id:0,host:'host.docker.internal:27017'}]}) }" | mongosh --port 27017 --quiet
interval: 5s
timeout: 30s
start_period: 0s
start_interval: 1s
retries: 30
volumes:
- mongodb-data:/data
restart: always
cds-simulator:
image: defradigital/trade-imports-cds-simulator-api:${TRADE_IMPORTS_CDS_SIMULATOR_API:-latest}
pull_policy: always
depends_on:
mongodb:
condition: service_healthy
env_file:
- 'compose/dotnet-service.env'
environment:
Mongo__DatabaseUri: mongodb://mongodb:27017/?directConnection=true
Acl__Clients__Developer__Secret: developer-pwd
ports:
- "5003:8080"
healthcheck:
test: [ "CMD", "curl", "-f", "http://localhost:8080/health/all" ]
interval: 5s
timeout: 5s
retries: 30
start_period: 5s
gateway:
build:
args:
DEFRA_NUGET_PAT: ${DEFRA_NUGET_PAT}
dockerfile: Dockerfile
depends_on:
localstack:
condition: service_healthy
wiremock:
condition: service_started
cds-simulator:
condition: service_healthy
ports:
- "3091:8080"
env_file:
- 'compose/aws.env'
environment:
ASPNETCORE_ENVIRONMENT: Development
AWS__ServiceURL: http://localstack:4566
AWS__AuthenticationRegion: eu-west-2
SQS_ENDPOINT: http://localstack:4566
Routing__AutomatedHealthCheckDisabled: false
Routing__NamedLinks__Stub__Link: "http://wiremock/stub"
Routing__NamedLinks__CdsAlvs__Link: "http://wiremock/alvs/"
Routing__NamedLinks__AlvsCds__Link: "http://wiremock/cds/"
Routing__NamedLinks__AlvsIpaffs__Link: "http://wiremock/ipaffs/"
Routing__Destinations__BtmsCds__Link: "http://cds-simulator:8080"
HealthCheck__AutomatedHealthCheckDisabled: false
HealthCheck__Urls__Stub__Url: "http://wiremock/stub/health"
HealthCheck__Urls__IBM_ALVS__Url: "http://wiremock/alvs/health"
HealthCheck__Urls__HMRC_CDS__Url: "http://cds-simulator:8080/health"
HealthCheck__Urls__IPAFFS_Soap_Search__Url: "http://wiremock/ipaffs/health"
Acl__Clients__IntegrationTests__Secret: integration-tests-pwd
Acl__Clients__IntegrationTests__Scopes__0: execute
AwsSqsOptions__VisibilityTimeout: 5
AwsSqsOptions__Topics__0: "arn:aws:sns:eu-west-2:000000000000:trade_imports_btms_activity"
AwsSqsOptions__Topics__1: "arn:aws:sns:eu-west-2:000000000000:trade_imports_inbound_customs_declarations.fifo"
healthcheck:
test: [ "CMD", "curl", "-f", "http://localhost:8080/health" ]
interval: 300s
timeout: 5s
retries: 10
start_period: 5s
volumes:
mongodb-data: