generated from ministryofjustice/hmpps-template-typescript
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
154 lines (144 loc) · 3.84 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
# Runs the application and full suite of services it depends on
services:
redis:
image: redis:7
networks:
- hmpps
container_name: inc-ui-redis
environment:
- ALLOW_EMPTY_PASSWORD=yes
ports:
- '6379:6379'
minio:
image: minio/minio
networks:
- hmpps
container_name: inc-ui-minio
environment:
- MINIO_ROOT_USER=incentives
- MINIO_ROOT_PASSWORD=incentives
- MINIO_SITE_REGION=eu-west-1
ports:
- '9000:9000'
- '9001:9001'
command:
- server
- --address
- :9000
- --console-address
- :9001
- /data
minio-init:
image: minio/mc
networks:
- hmpps
container_name: inc-ui-minio-init
depends_on:
- minio
environment:
- MINIO_ROOT_USER=incentives
- MINIO_ROOT_PASSWORD=incentives
- MINIO_SITE_REGION=eu-west-1
volumes:
- $PWD/server/testData/s3Bucket:/tmp/s3Bucket
entrypoint: |
/bin/sh -c "
echo Provisioning bucket with minio
until $$(curl --output /dev/null --silent http://minio:9000); do
echo 'Waiting for http://minio:9000'
sleep 3
done
mc config host add local http://minio:9000 $$MINIO_ROOT_USER $$MINIO_ROOT_PASSWORD
mc mb --region eu-west-1 --ignore-existing local/incentives
mc mirror --overwrite /tmp/s3Bucket local/incentives
exit 0
"
hmpps-auth:
image: quay.io/hmpps/hmpps-auth:latest
pull_policy: always
networks:
- hmpps
container_name: inc-ui-auth
ports:
- '9090:8080'
healthcheck:
test: ['CMD', 'curl', '-f', 'http://localhost:8080/auth/health']
environment:
- SPRING_PROFILES_ACTIVE=dev
- APPLICATION_AUTHENTICATION_UI_ALLOWLIST=0.0.0.0/0
hmpps-prison-api:
image: quay.io/hmpps/prison-api:latest
pull_policy: always
networks:
- hmpps
container_name: inc-ui-prison
depends_on:
- hmpps-auth
ports:
- '8080:8080'
healthcheck:
test: ['CMD', 'curl', '-f', 'http://localhost:8080/health']
environment:
- SERVER_PORT=8080
- SPRING_PROFILES_ACTIVE=nomis-hsqldb
hmpps-incentives-api:
image: quay.io/hmpps/hmpps-incentives-api:latest
pull_policy: always
networks:
- hmpps
container_name: inc-ui-incentives
depends_on:
- hmpps-auth
ports:
- '8081:8080'
healthcheck:
test: ['CMD', 'curl', '-f', 'http://localhost:8080/health']
environment:
- SERVER_PORT=8080
- SPRING_PROFILES_ACTIVE=dev
nomis-user-roles-api:
image: quay.io/hmpps/nomis-user-roles-api:latest
pull_policy: always
networks:
- hmpps
container_name: inc-ui-nomis-roles
depends_on:
- hmpps-auth
ports:
- '8082:8080'
healthcheck:
test: ['CMD', 'curl', '-f', 'http://localhost:8080/health']
environment:
- SPRING_PROFILES_ACTIVE=dev
- API_BASE_URL_OAUTH=http://hmpps-auth:8080/auth
app:
build: .
networks:
- hmpps
container_name: inc-ui
depends_on:
- redis
- minio
- hmpps-auth
- nomis-user-roles-api
- hmpps-prison-api
- hmpps-incentives-api
ports:
- '3000:3000'
environment:
- REDIS_HOST=redis
- HMPPS_AUTH_EXTERNAL_URL=http://localhost:9090/auth
- HMPPS_AUTH_URL=http://hmpps-auth:8080/auth
- HMPPS_PRISON_API_EXTERNAL_URL=http://localhost:8080
- HMPPS_PRISON_API_URL=http://hmpps-prison-api:8080
- S3_BUCKET_NAME=incentives
- S3_ENDPOINT=http://localhost:9000
- S3_ACCESS_KEY_ID=incentives
- S3_SECRET_ACCESS_KEY=incentives
# These will need to match new creds in the seed auth service auth
- API_CLIENT_ID=client-id
- API_CLIENT_SECRET=client-secret
- SYSTEM_CLIENT_ID=system-client-id
- SYSTEM_CLIENT_SECRET=system-client-secret
networks:
hmpps: