generated from ministryofjustice/hmpps-template-typescript
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
193 lines (181 loc) · 5.52 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
193
services:
hmpps-auth:
image: quay.io/hmpps/hmpps-auth:latest
networks:
- hmpps
container_name: hmpps-auth
ports:
- "8080:8080"
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8080/auth/health/ping"]
environment:
- SPRING_PROFILES_ACTIVE=dev
- APPLICATION_AUTHENTICATION_UI_ALLOWLIST=0.0.0.0/0
- DELIUS_ENABLED=false
- NOMIS_ENDPOINT_URL=http://nomis-user-roles-api:8080
- NOMIS_ENABLED=true
nomis-user-roles-api:
image: quay.io/hmpps/nomis-user-roles-api:latest
container_name: nomis-user-roles-api
networks:
- hmpps
ports:
- "8081:8080"
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8080/health/ping"]
environment:
- SERVER_PORT=8080
- SPRING_PROFILES_ACTIVE=dev
- API_BASE_URL_OAUTH=http://hmpps-auth:8080/auth
manage-users-api:
image: quay.io/hmpps/hmpps-manage-users-api:latest
container_name: manage-users-api
networks:
- hmpps
depends_on:
- nomis-user-roles-api
- hmpps-auth
ports:
- "8082:8080"
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8080/health/ping"]
environment:
- SERVER_PORT=8080
- SPRING_PROFILES_ACTIVE=dev
- HMPPS_AUTH_ENDPOINT_URL=http://hmpps-auth:8080/auth
- HMPPS_AUTH_EXTERNAL_ENDPOINT_URL=http://localhost:8080/auth
- NOMIS_ENDPOINT_URL=http://nomis-user-roles-api:8080
- AUTHORIZATION_SERVER_TOKEN_ENDPOINT_URL=http://hmpps-auth:8080/auth/oauth/token
locations-inside-prison-api:
image: quay.io/hmpps/hmpps-locations-inside-prison-api:latest
container_name: locations-inside-prison-api
depends_on:
- hmpps-auth
- locations-inside-prison-db
- localstack
networks:
- hmpps
ports:
- "8090:8080"
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8080/health/ping"]
environment:
- SERVER_PORT=8080
- SPRING_PROFILES_ACTIVE=seed
- API_BASE_URL_OAUTH=http://hmpps-auth:8080/auth
- SPRING_DATASOURCE_URL=jdbc:postgresql://locations-inside-prison-db:5432/locations_inside_prison?sslmode=prefer
- HMPPS_SQS_LOCALSTACK_URL=http://localstack:4566
- API_BASE_URL_PRISONER_SEARCH=http://prisoner-search:8080
- API_BASE_URL_PRISON_REGISTER=http://prison-register:8080
- LOCATIONS_INSIDE_PRISON_API_CLIENT_ID=hmpps-locations-inside-prison-system
- LOCATIONS_INSIDE_PRISON_API_CLIENT_SECRET=clientsecret
localstack:
image: localstack/localstack:stable
networks:
- hmpps
container_name: localstack
ports:
- "4566:4566"
- "8999:8080"
environment:
- DEBUG=${DEBUG- }
- DOCKER_HOST=unix:///var/run/docker.sock
volumes:
- "${TMPDIR:-/tmp/localstack}:/var/lib/localstack"
- "/var/run/docker.sock:/var/run/docker.sock"
locations-inside-prison-db:
image: postgres
networks:
- hmpps
container_name: locations-inside-prison-db
restart: unless-stopped
ports:
- "5432:5432"
environment:
- POSTGRES_PASSWORD=locations_inside_prison
- POSTGRES_USER=locations_inside_prison
- POSTGRES_DB=locations_inside_prison
prisoner-search:
image: wiremock/wiremock:latest
networks:
- hmpps
container_name: prisoner-search
ports:
- "8083:8080"
volumes:
- ./wiremock:/home/wiremock
redis:
image: 'redis:7.2'
networks:
- hmpps
container_name: redis
environment:
- ALLOW_EMPTY_PASSWORD=yes
ports:
- '6379:6379'
prison-register:
image: quay.io/hmpps/prison-register:latest
container_name: prison-register
depends_on:
- hmpps-auth
- prison-register-db
- localstack
networks:
- hmpps
healthcheck:
test: [ "CMD", "curl", "-f", "http://localhost:8080/health/ping" ]
environment:
- SERVER_PORT=8080
- SPRING_PROFILES_ACTIVE=dev
- API_BASE_URL_OAUTH=http://hmpps-auth:8080/auth
- SPRING_DATASOURCE_URL=jdbc:postgresql://prison-register-db:5432/prison-register?sslmode=prefer
- HMPPS_SQS_LOCALSTACK_URL=http://localstack:4566
prison-register-db:
image: postgres:16
networks:
- hmpps
container_name: prison-register-db
restart: always
ports:
- "5433:5432"
environment:
- POSTGRES_PASSWORD=prison-register
- POSTGRES_USER=prison-register
- POSTGRES_DB=prison-register
app:
build:
context: .
args:
BUILD_NUMBER: "1.0.0"
GIT_REF: "a1b2c3"
GIT_BRANCH: main
network_mode: "host"
depends_on:
- manage-users-api
- hmpps-auth
- locations-inside-prison-api
profiles:
- include-frontend
ports:
- "3000:3000"
environment:
- PRODUCT_ID=UNASSIGNED
- REDIS_HOST=localhost
- REDIS_ENABLED=true
- HMPPS_AUTH_EXTERNAL_URL=http://localhost:8080/auth
- HMPPS_AUTH_URL=http://localhost:8080/auth
- MANAGE_USERS_API_URL=http://localhost:8082
- API_CLIENT_ID=hmpps-locations-inside-prison
- API_CLIENT_SECRET=clientsecret
- SYSTEM_CLIENT_ID=hmpps-locations-inside-prison-system
- SYSTEM_CLIENT_SECRET=clientsecret
- SESSION_SECRET=somesecretvalue
- TOKEN_VERIFICATION_ENABLED=false
- TOKEN_VERIFICATION_API_URL=http://localhost:8080
- INGRESS_URL=http://localhost:3000
- COMPONENT_API_URL=http://not-used-in-local-dev
- COMMON_COMPONENTS_ENABLED=false
- DPS_URL=http://localhost:3000
- LOCATIONS_API_URL=http://localhost:8090
networks:
hmpps: