-
Notifications
You must be signed in to change notification settings - Fork 3
/
docker-compose.yml
98 lines (93 loc) · 2.51 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
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: >
/bin/sh -c "
liquibase --url=jdbc:postgresql://wfprev-postgres:5432/wfprev --changelog-file=db/wfprev-changelog.json --username=wfprev --password=${WFPREV_DB_PASSWORD} update &&
liquibase --url=jdbc:postgresql://wfprev-postgres:5432/wfprev --changelog-file=db/app_wf1_prev-changelog.json --username=app_wf1_prev --password=${APP_WF1_PREV_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: ${WFPREV_DATASOURCE_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
schemaspy:
profiles:
- schemaspy
build:
context: .
dockerfile: schemaspy/Dockerfile
container_name: schemaspy
depends_on:
db:
condition: service_healthy
environment:
POSTGRES_PASSWORD: ${WFPREV_DATASOURCE_PASSWORD}
command:
[
"-t", "pgsql",
"-host", "wfprev-postgres",
"-port", "5432",
"-db", "wfprev",
"-u", "wfprev",
"-p", "${WFPREV_DATASOURCE_PASSWORD}",
"-debug"
]
volumes:
- ./schemaspy/schemaspy-output:/output
networks:
- wfprev-network
networks:
wfprev-network:
driver: bridge
volumes:
postgres_data:
driver: local