-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathdocker-compose.yml
192 lines (181 loc) · 6.04 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
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
180
181
182
183
184
185
186
187
188
189
190
191
192
services:
postgres:
image: postgres
restart: always
networks:
- hmpps
environment:
POSTGRES_USER: root
POSTGRES_PASSWORD: dev
tmpfs:
- /var/lib/postgresql
redis:
image: "redis:6.2.3-alpine"
networks:
- hmpps
auth-db:
image: postgres:16
restart: always
networks:
- hmpps
environment:
- POSTGRES_PASSWORD=admin_password
- POSTGRES_USER=admin
- POSTGRES_DB=auth-db
hmpps-auth:
image: quay.io/hmpps/hmpps-auth:latest
networks:
- hmpps
depends_on:
- wiremock
- auth-db
healthcheck:
test: [ "CMD", "curl", "-f", "http://hmpps-auth:9090/auth/health" ]
interval: 5s
retries: 60
environment:
- SERVER_PORT=9090
- SPRING_PROFILES_ACTIVE=dev,delius,local-postgres
- APPLICATION_AUTHENTICATION_UI_ALLOWLIST=0.0.0.0/0
- LOGGING_LEVEL_ORG_SPRINGFRAMEWORK_SECURITY=DEBUG
- DELIUS_ENDPOINT_URL=http://wiremock:8080/delius
- MANAGE_USERS_API_ENDPOINT_URL=http://hmpps-manage-users-api:8080
- SPRING_DATASOURCE_URL=jdbc:postgresql://auth-db:5432/auth-db
hmpps-external-users-api:
image: quay.io/hmpps/hmpps-external-users-api:latest
depends_on:
- hmpps-auth
- auth-db
healthcheck:
test: [ "CMD", "curl", "-f", "http://hmpps-external-users-api:8080/health/ping" ]
interval: 5s
retries: 60
environment:
- SERVER_PORT=8080
- SPRING_PROFILES_ACTIVE=dev,local-postgres
- API_BASE_URL_OAUTH=http://hmpps-auth:9090/auth
- SPRING_R2DBC_URL=r2dbc:postgresql://auth-db:5432/auth-db?sslmode=prefer
- SPRING_FLYWAY_URL=jdbc:postgresql://auth-db:5432/auth-db?sslmode=prefer
hmpps-manage-users-api:
image: quay.io/hmpps/hmpps-manage-users-api:latest
depends_on:
- hmpps-auth
- hmpps-external-users-api
- wiremock
healthcheck:
test: [ "CMD", "curl", "-f", "http://hmpps-manage-users-api:8080/health/ping" ]
interval: 5s
retries: 60
environment:
- SERVER_PORT=8080
- SPRING_PROFILES_ACTIVE=dev,local-docker
gotenberg:
image: thecodingmachine/gotenberg:7
restart: always
networks:
- hmpps
localstack:
image: localstack/localstack:latest
networks:
- hmpps
environment:
- SERVICES=sns,s3
- LOCALSTACK_HOST=localstack:4566
- DEBUG=1
- DEFAULT_REGION=eu-west-2
- AWS_DEFAULT_REGION=eu-west-2
- USE_SSL=false
volumes:
- "${LOCALSTACK_VOLUME_DIR:-./volume}:/var/lib/localstack"
- "./scripts/localstack/init:/etc/localstack/init/ready.d"
- "./scripts/localstack/wait:/scripts/wait"
healthcheck:
test: [ "CMD", "bash", "/scripts/wait/healthcheck.sh" ]
interval: 5s
timeout: 10s
retries: 50
wiremock:
image: rodolpheche/wiremock
networks:
- hmpps
volumes:
- ./wiremock:/home/wiremock
command:
- -verbose
- -global-response-templating
community-payback-assessment-api:
image: quay.io/hmpps/hmpps-assessments-api:${API_IMAGE_TAG:-latest}
restart: always
networks:
- hmpps
depends_on:
- hmpps-auth
- postgres
- localstack
- redis
- wiremock
healthcheck:
test: ["CMD", "curl", "-f", "http://community-payback-assessment-api:8080/health"]
interval: 5s
retries: 60
environment:
- SERVER_PORT=8080
- SPRING_PROFILES_ACTIVE=dev,postgres
- OAUTH_ENDPOINT_URL=${OAUTH_ENDPOINT_URL:-http://hmpps-auth:9090/auth}
- LOGGING_LEVEL_ORG_SPRINGFRAMEWORK_SECURITY=DEBUG
- DATABASE_ENDPOINT=postgres:5432
- AWS_ENDPOINT_URL=http://localstack:4566
- AWS_ACCESS_KEY_ID=local
- AWS_SECRET_ACCESS_KEY=local
- SPRING_DATA_REDIS_HOST=redis
- SPRING_DATA_REDIS_SSL_ENABLED=false
- HMPPS_SQS_USE_WEB_TOKEN=false
- ASSESS_RISKS_AND_NEEDS_API_BASE_URL=http://wiremock:8080/
- ASSESS_RISKS_AND_NEEDS_API_ID=${API_CLIENT_CREDENTIALS_ID:-hmpps-community-payback-api-client}
- ASSESS_RISKS_AND_NEEDS_API_CLIENT_SECRET=${API_CLIENT_CREDENTIALS_SECRET:-clientsecret}
- DELIUS_INTEGRATION_BASE_URL=http://wiremock:8080
- DELIUS_INTEGRATION_CLIENT_ID=${API_CLIENT_CREDENTIALS_ID:-hmpps-community-payback-api-client}
- DELIUS_INTEGRATION_CLIENT_SECRET=${API_CLIENT_CREDENTIALS_SECRET:-clientsecret}
community-payback-assessment-ui:
image: quay.io/hmpps/hmpps-risk-assessment-ui:${UI_IMAGE_TAG:-latest}
networks:
- hmpps
healthcheck:
test: ["CMD", "curl", "-f", "http://community-payback-assessment-ui:3000/health"]
interval: 5s
retries: 60
environment:
- OAUTH_ENDPOINT_URL=${OAUTH_ENDPOINT_URL:-http://hmpps-auth:9090/auth}
- OAUTH_EXTERNAL_URL=${OAUTH_EXTERNAL_URL:-http://hmpps-auth:9090/auth}
- HMPPS_ASSESSMENT_API_URL=http://community-payback-assessment-api:8080
- PDF_CONVERTER_ENDPOINT=http://gotenberg:3000/forms/chromium/convert/html
- API_CLIENT_ID=${UI_CLIENT_CREDENTIALS_ID:-hmpps-community-payback-api-client}
- API_CLIENT_SECRET=${UI_CLIENT_CREDENTIALS_SECRET:-clientsecret}
- AUTH_CLIENT_ID=${UI_AUTHORIZATION_CODE_ID:-hmpps-community-payback-ui-client}
- AUTH_CLIENT_SECRET=${UI_AUTHORIZATION_CODE_SECRET:-clientsecret}
- OAUTH_VERIFY_TOKEN=false
- SHOW_DETAILED_ERRORS=true
- SHOW_REQUEST_ID_ON_ERROR_PAGE=true
- USE_LOCALSTACK=true
- SHOW_NOTIFICATION=false
- NOTIFICATION_HEADER=
- NOTIFICATION_BODY=
- AWS_ENDPOINT_URL=http://localstack:4566
- AWS_ACCESS_KEY_ID=local
- AWS_SECRET_ACCESS_KEY=local
- S3_REGION=eu-west-2
- S3_BUCKET_NAME=hmpps-assessments-s3
- SNS_REGION=eu-west-2
- SNS_TOPIC_ARN=arn:aws:sns:eu-west-2:000000000000:hmpps-assessments-topic
- REDIS_HOST=redis
- REDIS_TLS_ENABLED=false
- LOGGING_LEVEL=debug
- INGRESS_URL=http://community-payback-assessment-ui:3000
- NODE_ENV=development
depends_on:
- hmpps-auth
- localstack
- community-payback-assessment-api
- gotenberg
networks:
hmpps: