-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathdocker-compose.yml
78 lines (74 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
75
76
77
78
version: '3'
services:
postgres:
image: postgres:16-alpine
ports:
- "5432:5432"
environment:
- POSTGRES_DB=meditrack
- POSTGRES_USER=meditrack
- POSTGRES_PASSWORD=PFtkqhXnCxFSScMY5Zh5
healthcheck:
test: [ "CMD-SHELL", "sh -c 'pg_isready -U ${POSTGRES_USER} -d ${POSTGRES_DB}'" ]
interval: 10s
timeout: 3s
retries: 3
backend:
profiles:
- backend
build:
context: backend
dockerfile: Dockerfile
image: meditrack-backend
ports:
- "8081:8081"
environment:
PROFILE: ${PROFILE:-default}
env_file:
- ./backend/docker-compose.env
depends_on:
postgres:
condition: service_healthy
keycloak-config:
condition: service_completed_successfully
angular:
profiles:
- frontend
build:
context: frontend
dockerfile: Dockerfile
image: meditrack-frontend
ports:
- "4200:80"
keycloak:
profiles:
- keycloak
build:
context: keycloak
dockerfile: Dockerfile
image: meditrack-keycloak
ports:
- "8080:8080"
environment:
KEYCLOAK_ADMIN: "admin"
KEYCLOAK_ADMIN_PASSWORD: "admin"
keycloak-config: # Only required to run once. Service will fail
profiles:
- keycloak
image: adorsys/keycloak-config-cli:latest-24.0.1
volumes:
- kc_config:/config
environment:
KEYCLOAK_URL: "http://keycloak:8080/"
KEYCLOAK_USER: "admin"
KEYCLOAK_PASSWORD: "admin"
KEYCLOAK_AVAILABILITYCHECK_ENABLED: true
KEYCLOAK_AVAILABILITYCHECK_TIMEOUT: "120s"
IMPORT_FILES_LOCATIONS: "/config/meditrack.json"
volumes:
kc_config:
driver: local
driver_opts:
type: 'none'
o: 'bind'
device: 'keycloak/config'