-
Notifications
You must be signed in to change notification settings - Fork 17
/
Copy pathdocker-compose.yml
138 lines (131 loc) · 3.79 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
services:
db:
image: postgres:16.4
command: postgres -c 'max_connections=250'
environment:
- POSTGRES_MULTIPLE_DATABASES=dpc_attribution,dpc_queue,dpc_auth,dpc_consent,dpc-website_development,bcda,dpc-portal_development
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=dpc-safe
volumes:
# Mount database startup script, which automatically creates new databases
# based on the POSTGRES_MULTIPLE_DATABASES variable above.
- ./docker/postgres:/docker-entrypoint-initdb.d
# Mount persistent volume to ensure data is not erased across containers.
- pgdata16:/var/lib/postgresql/data
- ./tmp:/var/tmp
healthcheck:
test: "pg_isready -U $${POSTGRES_USER}"
interval: 10s
timeout: 5s
start_period: 30s
retries: 5
aggregation:
image: ${ECR_HOST:-755619740999.dkr.ecr.us-east-1.amazonaws.com/dpc-aggregation}:latest
ports:
- "9901:9901"
env_file:
- ./ops/config/decrypted/local.env
environment:
- ENV=local
- USE_BFD_MOCK=${USE_BFD_MOCK:-true}
- EMIT_AWS_METRICS=${EMIT_AWS_METRICS:-false}
- JACOCO=${REPORT_COVERAGE:-false}
- DEBUG_MODE=${DEBUG_MODE:-false}
depends_on:
db:
condition: service_healthy
consent:
condition: service_healthy
volumes:
- export-volume:/app/data
- ./jacocoReport/dpc-aggregation:/jacoco-report
healthcheck:
test: curl --fail http://localhost:9901/healthcheck || exit 1
interval: 10s
timeout: 5s
start_period: 30s
retries: 5
attribution:
image: ${ECR_HOST:-755619740999.dkr.ecr.us-east-1.amazonaws.com/dpc-attribution}:latest
depends_on:
db:
condition: service_healthy
environment:
- ENV=local
- JACOCO=${REPORT_COVERAGE:-false}
- DEBUG_MODE=${DEBUG_MODE:-false}
ports:
- "3500:8080"
- "9902:9902"
volumes:
- ./jacocoReport/dpc-attribution:/jacoco-report
healthcheck:
test: curl --fail http://localhost:9902/healthcheck || exit 1
interval: 10s
timeout: 5s
start_period: 30s
retries: 5
api:
image: ${ECR_HOST:-755619740999.dkr.ecr.us-east-1.amazonaws.com/dpc-api}:latest
ports:
- "3002:3002"
- "9903:9900"
env_file:
- ./ops/config/decrypted/local.env
environment:
- ENV=local
- JACOCO=${REPORT_COVERAGE:-false}
- EXPORT_PATH=/app/data
- AUTH_DISABLED=${AUTH_DISABLED:-false}
- DEBUG_MODE=${DEBUG_MODE:-false}
- USE_BFD_MOCK=${USE_BFD_MOCK:-true}
depends_on:
attribution:
condition: service_healthy
volumes:
- export-volume:/app/data
- ./jacocoReport/dpc-api:/jacoco-report
healthcheck:
test: curl --fail http://localhost:9900/healthcheck || exit 1
interval: 10s
timeout: 5s
start_period: 30s
retries: 5
consent:
image: ${ECR_HOST:-755619740999.dkr.ecr.us-east-1.amazonaws.com/dpc-consent}:latest
depends_on:
db:
condition: service_healthy
environment:
- ENV=local
- JACOCO=${REPORT_COVERAGE:-false}
- DEBUG_MODE=${DEBUG_MODE:-false}
ports:
- "3600:3600"
- "9904:9904"
volumes:
- ./jacocoReport/dpc-consent:/jacoco-report
healthcheck:
test: curl --fail http://localhost:9904/healthcheck || exit 1
interval: 10s
timeout: 5s
start_period: 30s
retries: 5
tests:
image: maven:3.6-jdk-11
env_file:
- ./ops/config/decrypted/local.env
volumes:
- export-volume:/tmp
- ./:/usr/src/mymaven
working_dir: /usr/src/mymaven
command: sh -c "mvn verify -Pintegration-tests -am -ntp -Djib.skip=true"
network_mode: host
volumes:
pgdata16:
export-volume:
driver: local
driver_opts:
type: none
device: /tmp
o: bind