generated from hmcts/service-hmcts-crime-springboot-template
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
36 lines (35 loc) · 1 KB
/
docker-compose.yml
File metadata and controls
36 lines (35 loc) · 1 KB
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
services:
db:
image: postgres:16-alpine
container_name: cdks_CP_CDK_DB_it
environment:
POSTGRES_DB: appdb
POSTGRES_USER: app
POSTGRES_PASSWORD: app
ports:
- "55432:5432"
healthcheck:
test: [ "CMD-SHELL", "pg_isready -U app -d appdb" ]
interval: 5s
timeout: 3s
retries: 30
app:
container_name: cdks_app_it
build:
context: .. # project root (so Docker has access to source)
dockerfile: docker/Dockerfile
ports:
- "8082:8082"
environment:
CP_CDK_DATASOURCE_URL: jdbc:postgresql://db:5432/casedocumentknowledgeDatabase
CP_CDK_DATASOURCE_USERNAME: casedocumentknowledge
CP_CDK_DATASOURCE_PASSWORD: casedocumentknowledge
SERVER_PORT: 8082
depends_on:
db:
condition: service_healthy
healthcheck:
test: [ "CMD-SHELL", "curl -f http://localhost:8082/casedocumentknowledge-service/actuator/health || exit 1" ]
interval: 10s
timeout: 3s
retries: 12