-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathdocker-compose.yml
197 lines (186 loc) · 5.26 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
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
services:
server:
build:
context: ./server
dockerfile: Dockerfile
container_name: prompt-core-server
depends_on:
db:
condition: service_healthy
keycloak:
condition: service_healthy
ports:
- "8080:8080"
environment:
- CORE_HOST=http://localhost:3000
- DB_USER=prompt-postgres
- DB_PASSWORD=prompt-postgres
- DB_HOST=localhost
- DB_PORT=5432
- DB_NAME=prompt
- SSL_MODE=disable
- SERVER_ADDRESS=0.0.0.0:8080
- KEYCLOAK_HOST=localhost:8081
- KEYCLOAK_REALM_NAME=prompt
- KEYCLOAK_CLIENT_ID=prompt-server
- KEYCLOAK_CLIENT_SECRET=TvoTuMQWcwXTk8bqY49ElCVz8JthXyMb #DO NOT USE IN PRODUCTION !!!
- KEYCLOAK_ID_OF_CLIENT=a584ca61-fa83-4e95-98b6-c5f3157ae4b4
- KEYCLOAK_AUTHORIZED_PARTY=prompt-client
core:
build:
context: ./clients/core
dockerfile: Dockerfile
container_name: prompt-client-core
ports:
- "3000:80"
depends_on:
- clients-base
template_component:
build:
context: ./clients/template_component
dockerfile: Dockerfile
container_name: prompt-client-template-component
ports:
- "3001:80"
depends_on:
- clients-base
clients-base:
build:
context: ./clients
dockerfile: Dockerfile
image: base:latest
db:
image: "postgres:15.2-alpine"
container_name: prompt-core-db
environment:
- POSTGRES_USER=prompt-postgres
- POSTGRES_PASSWORD=prompt-postgres
- POSTGRES_DB=prompt
- TZ=Europe/Berlin
volumes:
- ./postgres_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -d prompt -U prompt-postgres"]
interval: 5s
timeout: 5s
retries: 5
ports:
- "5432:5432"
db-intro-course:
image: "postgres:15.2-alpine"
container_name: prompt-intro-course-db
environment:
- POSTGRES_USER=prompt-postgres
- POSTGRES_PASSWORD=prompt-postgres
- POSTGRES_DB=prompt
- TZ=Europe/Berlin
volumes:
- ./postgres_intro_course_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -d prompt -U prompt-postgres"]
interval: 5s
timeout: 5s
retries: 5
ports:
- "5433:5432"
db-team-allocation:
image: "postgres:15.2-alpine"
container_name: prompt-team-allocation-db
environment:
- POSTGRES_USER=prompt-postgres
- POSTGRES_PASSWORD=prompt-postgres
- POSTGRES_DB=prompt
- TZ=Europe/Berlin
volumes:
- ./postgres_team_allocation_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -d prompt -U prompt-postgres"]
interval: 5s
timeout: 5s
retries: 5
ports:
- "5434:5432"
db-assessment:
image: "postgres:15.2-alpine"
container_name: prompt-assessment-db
environment:
- POSTGRES_USER=prompt-postgres
- POSTGRES_PASSWORD=prompt-postgres
- POSTGRES_DB=prompt
- TZ=Europe/Berlin
volumes:
- ./postgres_assessment_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -d prompt -U prompt-postgres"]
interval: 5s
timeout: 5s
retries: 5
ports:
- "5435:5432"
db-self-team-allocation:
image: "postgres:15.2-alpine"
container_name: prompt-self-team-allocation-db
environment:
- POSTGRES_USER=prompt-postgres
- POSTGRES_PASSWORD=prompt-postgres
- POSTGRES_DB=prompt
- TZ=Europe/Berlin
volumes:
- ./postgres_self_team_allocation_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -d prompt -U prompt-postgres"]
interval: 5s
timeout: 5s
retries: 5
ports:
- "5436:5432"
keycloak-db:
image: "postgres:15.2-alpine"
container_name: prompt-keycloak-db
environment:
- POSTGRES_USER=keycloak
- POSTGRES_PASSWORD=keycloak
- POSTGRES_DB=keycloak
- TZ=Europe/Berlin
volumes:
- ./keycloak_postgres_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U keycloak -d keycloak"]
interval: 5s
timeout: 5s
retries: 5
ports:
- "5431:5432"
keycloak:
image: quay.io/keycloak/keycloak:25.0
container_name: prompt-keycloak
environment:
KC_DB: postgres
KC_DB_URL_HOST: keycloak-db
KC_DB_URL_PORT: 5432
KC_DB_USERNAME: keycloak
KC_DB_PASSWORD: keycloak
KEYCLOAK_ADMIN: admin
KEYCLOAK_ADMIN_PASSWORD: admin
entrypoint: /opt/keycloak/bin/kc.sh start-dev
depends_on:
keycloak-db:
condition: service_healthy
restart: unless-stopped
ports:
- "127.0.0.1:8081:8080"
healthcheck:
test:
[
"CMD-SHELL",
'exec 3<>/dev/tcp/localhost/8080; echo -e "GET /health/ready HTTP/1.1\nhost: localhost:8080\n" >&3; timeout --preserve-status 1 cat <&3 | grep -m 1 status | grep -m 1 UP; ERROR=$?; exec 3<&-; exec 3>&-; exit',
]
postfix:
image: ghcr.io/ls1admin/postfix:latest
container_name: prompt-postfix
restart: unless-stopped
volumes:
- ./postfix-config:/config # See https://github.com/ls1admin/postfix-container-tum-mailrelay/tree/main for details
hostname: prompt.ase.cit.tum.de
ports:
- "25:25"