generated from ministryofjustice/hmpps-template-typescript
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
183 lines (171 loc) · 5.17 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
networks:
hmpps: null
services:
hmpps-accredited-programmes-api:
container_name: accredited-programmes-api
depends_on:
hmpps-accredited-programmes-db:
condition: service_healthy
environment:
- HMPPS_AUTH_URL=http://hmpps-auth:8080/auth
- SPRING_PROFILES_ACTIVE=dev,local,seed
- SERVICES_PRISONER-SEARCH-API_BASE-URL=http://wiremock:8080
- SERVICES_PRISON-REGISTER-API_BASE-URL=http://prison-register-api:8080
- SPRING_DATASOURCE_URL=jdbc:postgresql://accredited-programmes-db:5432/postgres
- SPRING_DATASOURCE_USERNAME=admin
- SPRING_DATASOURCE_PASSWORD=admin_password
healthcheck:
test: ['CMD', 'curl', '-f', 'http://localhost:8080/health']
image: quay.io/hmpps/hmpps-accredited-programmes-api:latest
networks:
- hmpps
ports:
- '9091:8080'
restart: always
hmpps-accredited-programmes-db:
container_name: accredited-programmes-db
environment:
- POSTGRES_USER=admin
- POSTGRES_PASSWORD=admin_password
healthcheck:
interval: 10s
retries: 5
test: ['CMD', 'pg_isready', '--username=admin', '--dbname=postgres']
timeout: 5s
image: postgres
networks:
- hmpps
ports:
- '5432:5432'
restart: always
hmpps-auth:
container_name: hmpps-auth
depends_on:
- hmpps-auth-db
environment:
- SPRING_PROFILES_ACTIVE=dev,local-postgres
- SPRING_H2_CONSOLE_SETTINGS_WEBALLOWOTHERS=true
- APPLICATION_AUTHENTICATION_UI_ALLOWLIST=0.0.0.0/0
- SPRING_DATASOURCE_URL=jdbc:postgresql://hmpps-auth-db:5432/hmpps-auth-db
healthcheck:
test: ['CMD', 'curl', '-f', 'http://localhost:8080/auth/health']
image: quay.io/hmpps/hmpps-auth:latest
networks:
- hmpps
ports:
- '9090:8080'
hmpps-auth-db:
container_name: hmpps-auth-db
environment:
- POSTGRES_PASSWORD=admin_password
- POSTGRES_USER=admin
- POSTGRES_DB=hmpps-auth-db
healthcheck:
test: ['CMD', 'pg_isready', '--username=admin', '--dbname=hmpps-auth-db']
image: postgres:15
networks:
- hmpps
ports:
- '5434:5432'
restart: always
hmpps-external-users-api:
container_name: hmpps-external-users-api
depends_on:
- hmpps-auth-db
- hmpps-auth
environment:
- SERVER_PORT=8080
- SPRING_PROFILES_ACTIVE=dev,local-postgres
- SPRING_R2DBC_URL=r2dbc:postgresql://hmpps-auth-db:5432/hmpps-auth-db?sslmode=verify-full
- SPRING_FLYWAY_URL=jdbc:postgresql://hmpps-auth-db:5432/hmpps-auth-db?sslmode=verify-full
- API_BASE_URL_OAUTH=http://hmpps-auth:8080/auth
healthcheck:
test: ['CMD', 'curl', '-f', 'http://localhost:8080/health/ping']
image: quay.io/hmpps/hmpps-external-users-api:latest
networks:
- hmpps
ports:
- '9097:8080'
hmpps-manage-users-api:
container_name: hmpps-manage-users-api
depends_on:
- hmpps-auth
- hmpps-external-users-api
environment:
- SERVER_PORT=8080
- HMPPS_AUTH_ENDPOINT_URL=http://hmpps-auth:8080/auth
- API_BASE_URL_OAUTH=http://hmpps-auth:8080/auth
- SPRING_PROFILES_ACTIVE=dev
- EXTERNAL_USERS_ENDPOINT_URL=http://hmpps-external-users-api:8080
- AUTHORIZATION_SERVER_TOKEN_ENDPOINT_URL=http://hmpps-auth:8080/auth/oauth/token
- NOMIS_ENDPOINT_URL=http://nomis-user-roles-api:8080
healthcheck:
test: ['CMD', 'curl', '-f', 'http://localhost:8080/health']
image: quay.io/hmpps/hmpps-manage-users-api:latest
networks:
- hmpps
ports:
- '9095:8080'
nomis-user-roles-api:
container_name: nomis-user-roles-api
depends_on:
- hmpps-auth
environment:
- SERVER_PORT=8080
- SPRING_PROFILES_ACTIVE=dev
- API_BASE_URL_OAUTH=http://hmpps-auth:8080/auth
healthcheck:
test: ['CMD', 'curl', '-f', 'http://localhost:8080/health']
image: quay.io/hmpps/nomis-user-roles-api:latest
networks:
- hmpps
ports:
- '9096:8080'
prison-register-api:
container_name: prison-register-api
depends_on:
- prison-register-db
environment:
- SPRING_PROFILES_ACTIVE=dev
- OAUTH_ENDPOINT_URL=http://hmpps-auth:8080/auth
- DATABASE_NAME=prison-register
- SPRING_DATASOURCE_USERNAME=prison-register
- SPRING_DATASOURCE_PASSWORD=prison-register
- SPRING_DATASOURCE_URL=jdbc:postgresql://prison-register-db:5432/postgres
healthcheck:
test: ['CMD', 'curl', '-f', 'http://localhost:8080/health']
image: quay.io/hmpps/prison-register:latest
networks:
- hmpps
ports:
- '9092:8080'
prison-register-db:
container_name: prison-register-db
environment:
- POSTGRES_PASSWORD=prison-register
- POSTGRES_USER=prison-register
- POSTGRES_DB=prison-register
image: postgres:15
networks:
- hmpps
ports:
- '5433:5432'
restart: always
redis:
container_name: redis
environment:
- ALLOW_EMPTY_PASSWORD=yes
image: redis:6.2
networks:
- hmpps
ports:
- '6379:6379'
wiremock:
container_name: wiremock
image: wiremock/wiremock
networks:
- hmpps
ports:
- '9099:8080'
restart: always
version: '3.1'