-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yaml
91 lines (90 loc) · 2.17 KB
/
docker-compose.yaml
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
services:
auth-db:
image: postgres:14.15-alpine
environment:
- POSTGRES_DB=auth_db
- POSTGRES_USER=auth_db
- POSTGRES_PASSWORD=auth_db
- PGUSER=auth_db
healthcheck:
test: ["CMD-SHELL", "pg_isready"]
interval: 10s
timeout: 5s
retries: 5
volumes:
- auth-db-data:/var/lib/postgresql/data
auth-ldap:
image: 389ds/dirsrv:3.1
environment:
- DS_DM_PASSWORD=auth_ldap_admin
shm_size: 256m
auth-ldapinit:
build: ./auth-ldapinit
volumes:
- ./auth-ldapinit/ldif/:/ldif/
environment:
- DS_DM_PASSWORD=auth_ldap_admin
- DS_BASE_DN=dc=example,dc=org
depends_on:
- auth-ldap
auth-server:
image: quay.io/keycloak/keycloak:26.0.7
ports:
- "8080:8080"
volumes:
- ./auth-server/realm:/opt/keycloak/data/import:ro
environment:
- KC_DB=postgres
- KC_DB_URL=jdbc:postgresql://auth-db:5432/auth_db
- KC_DB_USERNAME=auth_db
- KC_DB_PASSWORD=auth_db
- KC_BOOTSTRAP_ADMIN_USERNAME=admin
- KC_BOOTSTRAP_ADMIN_PASSWORD=admin
command:
- start-dev
- --import-realm
restart: always
depends_on:
- auth-db
- auth-ldap
- auth-ldapinit
web-app:
image: node:20
working_dir: /app
volumes:
- ./web-app/app:/app
command: sh -c "yarn && yarn dev --host"
ports:
- "3000:3000"
resource-db:
image: postgres:14.15-alpine
environment:
- POSTGRES_DB=resource_db
- POSTGRES_USER=resource_db
- POSTGRES_PASSWORD=resource_db
- PGUSER=resource_db
healthcheck:
test: ["CMD-SHELL", "pg_isready"]
interval: 10s
timeout: 5s
retries: 5
volumes:
- ./resource-db/init/init.sql:/docker-entrypoint-initdb.d/init.sql
- resource-db-data:/var/lib/postgresql/data
resource-server:
build: ./resource-server
environment:
- DB_HOST=resource-db
- DB_PORT=5432
- DB_NAME=resource_db
- DB_USERNAME=resource_db
- DB_PASSWORD=resource_db
volumes:
- ./resource-server/app:/app
ports:
- "8081:8081"
depends_on:
- resource-db
volumes:
auth-db-data:
resource-db-data: