-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathdocker-compose-full.yml
178 lines (168 loc) · 5.19 KB
/
docker-compose-full.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
version: '3.7'
networks:
hmpps:
services:
court-case-service:
image: quay.io/hmpps/court-case-service:latest
container_name: court-case-service
networks:
- hmpps
depends_on:
postgres:
condition: service_healthy
ports:
- "8080:8080"
entrypoint: [ "/bin/sh", "/app/run.sh" ]
healthcheck:
test: [ "CMD", "curl", "-f", "http://localhost:8080/auth/health" ]
environment:
- SPRING_PROFILES_ACTIVE=docker
- SPRING_DATASOURCE_USER=appuser
- SPRING_DATASOURCE_PASSWORD=postgres
- SPRING_DATASOURCE_URL=jdbc:postgresql://postgres:5432/postgres
postgres:
image: postgres:11.15-alpine
ports:
- 5432:5432
networks:
- hmpps
environment:
POSTGRES_USER: appuser
POSTGRES_PASSWORD: postgres
tmpfs:
- /var/lib/postgresql
healthcheck:
test: [ "CMD-SHELL", "pg_isready -U appuser" ]
interval: 10s
timeout: 5s
retries: 5
oauth:
image: mojdigitalstudio/nomis-oauth2-server:latest
networks:
- hmpps
container_name: oauth
ports:
- '8095:8095'
healthcheck:
test: [ 'CMD', 'curl', '-f', 'http://localhost:8095/auth/health' ]
environment:
- SERVER_PORT=8095
- SPRING_PROFILES_ACTIVE=dev
community-api:
image: quay.io/hmpps/community-api:latest
networks:
- hmpps
container_name: community-api
ports:
- "8096:8080"
healthcheck:
test: [ "CMD", "curl", "-f", "http://localhost:8080/health" ]
environment:
- SERVER_PORT=8080
- SPRING_PROFILES_ACTIVE=dev
offender-assessment-api:
image: mojdigitalstudio/offender-assessments-api:latest
networks:
- hmpps
container_name: offender-assessment-api
depends_on:
- oauth
ports:
- "8097:8080"
healthcheck:
test: [ "CMD", "curl", "-f", "http://localhost:8080/health" ]
environment:
- SERVER_PORT=8080
- SPRING_PROFILES_ACTIVE=dev
- OAUTH_ENDPOINT_URL=http://oauth:8095/auth
localstack-court-case-service:
image: localstack/localstack:latest
networks:
- hmpps
container_name: localstack-court-case-service
hostname: awslocal
ports:
- "127.0.0.1:4566:4566" # LocalStack Gateway
- "127.0.0.1:4510-4559:4510-4559" # external services port range
environment:
- SERVICES=sns,sqs
- DEBUG=${DEBUG- }
- PERSISTENCE=1
- DOCKER_HOST=unix:///var/run/docker.sock
- HOSTNAME_EXTERNAL=awslocal
volumes:
- "${LOCALSTACK_VOLUME_DIR:-./volume}:/var/lib/localstack"
- "/var/run/docker.sock:/var/run/docker.sock"
hmpps-user-preferences:
image: wiremock/wiremock:3.3.1
container_name: hmpps-user-preferences
networks:
- hmpps
entrypoint: ["/docker-entrypoint.sh", "--disable-request-logging", "--disable-banner", "--global-response-templating"]
volumes:
- ./wiremock/mappings/hmpps-user-preferences:/home/wiremock/mappings
restart: always
ports:
- "9093:8080"
redis:
image: 'bitnami/redis:7.2.4'
networks:
- hmpps
container_name: prepare-a-case-redis
environment:
- ALLOW_EMPTY_PASSWORD=yes
ports:
- '6379:6379'
healthcheck:
test: [ "CMD", "redis-cli", "--raw", "incr", "ping" ] # ping redis and write to a key to ensure service is up
app:
build:
context: compose
dockerfile: ./Dockerfile
target: development
container_name: prepare-a-case-app
volumes:
- ./bin:/usr/src/app/bin
- ./server:/usr/src/app/server
- ./public:/usr/src/app/public
- ./tests:/usr/src/app/tests
- ./pact:/usr/src/app/pact
- ./schemas:/usr/src/app/schemas
- ./wiremock:/usr/src/app/wiremock
environment:
- REDIS_HOST=redis
- PORT=3000
- PAC_ENV=dev
- NODE_ENV=development
- ENABLE_APP_INSIGHTS=false
- API_CLIENT_ID=${API_CLIENT_ID:-prepare-a-case-for-court}
- API_CLIENT_SECRET=${API_CLIENT_SECRET:-clientsecret}
- APP_VERSION=dev-build
- NOMIS_AUTH_URL=${NOMIS_AUTH_URL:-http://hmpps-auth:8080/auth}
- NOMIS_AUTH_URL_REDIRECT=${NOMIS_AUTH_URL:-http://localhost:9091/auth}
- NOMIS_DISABLE_OAUTH_STATE=${NOMIS_DISABLE_OAUTH_STATE:-true}
- REDUCE_STDOUT_NOISE=true
- USER_PREFERENCE_SERVICE_URL=${USER_PREFERENCE_SERVICE_URL:-http://hmpps-user-preferences:8080}
- COURT_CASE_SERVICE_URL=${COURT_CASE_SERVICE_URL:-http://court-case-service:8080}
- NOTIFICATION_USERNAME=test
- NOTIFICATION_PASSWORD=test
- HEARING_OUTCOMES_PAGE_SIZE=${HEARING_OUTCOMES_PAGE_SIZE:-2}
- ENABLE_CASE_COMMENTS=${ENABLE_CASE_COMMENTS:-true}
- ENABLE_CASE_PROGRESS=${ENABLE_CASE_PROGRESS:-true}
- ENABLE_WORKFLOW=${ENABLE_WORKFLOW:-true}
- ENABLE_HEARING_OUTCOMES=${ENABLE_HEARING_OUTCOMES:-true}
- ENABLE_PAST_CASES_NAVIGATION=${ENABLE_PAST_CASES_NAVIGATION:-true}
- ENABLE_MOVE_TO_RESULTED_ACTION=${ENABLE_MOVE_TO_RESULTED_ACTION:-true}
env_file:
- .env
networks:
- hmpps
depends_on:
redis:
condition: service_healthy
hmpps-user-preferences:
condition: service_started
ports:
- '3000:3000'
- '9229:9229'
restart: always