-
Notifications
You must be signed in to change notification settings - Fork 3
/
docker-compose.yml
74 lines (70 loc) · 1.76 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
services:
api:
profiles:
- api
build:
context: .
dockerfile: server/wfprev-api/Dockerfile.graalvm
# Pass the maven settings file and repo credentials as build args
args:
- MAVEN_SETTINGS_FILE=vivid.settings.xml
- REPO_LOGIN=${REPO_LOGIN}
- REPO_PASSWORD=${REPO_PASSWORD}
environment:
# Environment variables for the application
WFPREV_DATASOURCE_URL: ${WFPREV_DATASOURCE_URL}
WFPREV_DATASOURCE_USERNAME: ${WFPREV_DATASOURCE_USERNAME}
WFPREV_DATASOURCE_PASSWORD: ${WFPREV_DATASOURCE_PASSWORD}
ports:
- "8080:8080" # Map the API's port to the host
depends_on:
db:
condition: service_healthy
networks:
- wfprev-network
env_file:
- .env
liquibase:
build:
context: db
dockerfile: Dockerfile.liquibase.local
command: [
"liquibase",
"--url=jdbc:postgresql://wfprev-postgres:5432/wfprev",
"--changelog-file=db/main-changelog.json",
"--username=wfprev",
"--password=${POSTGRES_PASSWORD}",
"update"
]
volumes:
- ./db:/liquibase/db
depends_on:
db:
condition: service_healthy
networks:
- wfprev-network
db:
image: postgis/postgis:16-3.4
container_name: wfprev-postgres
environment:
POSTGRES_USER: wfprev
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
POSTGRES_DB: wfprev
ports:
- "5432:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
networks:
- wfprev-network
healthcheck:
test: [ "CMD-SHELL", "pg_isready -U wfprev -d wfprev" ]
interval: 5s
timeout: 5s
retries: 5
start_period: 10s
networks:
wfprev-network:
driver: bridge
volumes:
postgres_data:
driver: local