-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcompose.yml
More file actions
251 lines (237 loc) · 6.38 KB
/
compose.yml
File metadata and controls
251 lines (237 loc) · 6.38 KB
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
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
name: team-server-down
services:
mailhog:
restart: always
build:
context: ./docker/mailhog
dockerfile: Dockerfile
ports:
- "1025:1025"
- "8025:8025"
networks:
- server
keycloak:
restart: always
build:
context: ./docker/keycloak
dockerfile: Dockerfile
ports:
- "8080:8080"
command:
- start-dev
- --import-realm
- -Dkeycloak.migration.strategy=OVERWRITE_EXISTING
- --transaction-xa-enabled=false
depends_on:
db:
condition: service_healthy
environment:
KC_DB: postgres
KC_DB_URL: jdbc:postgresql://db:5432/keycloak
KC_DB_USERNAME: root
KC_DB_PASSWORD: password
KC_HOSTNAME: localhost
KEYCLOAK_ADMIN: admin
KEYCLOAK_ADMIN_PASSWORD: password
KC_HTTP_ENABLED: true
KC_HOSTNAME_STRICT: false
KC_HEALTH_ENABLED: true
volumes:
- ./docker/keycloak/realm-export.json:/opt/keycloak/data/import/realm-export.json:ro
networks:
- server
server:
restart: always
build:
context: ./server
dockerfile: Dockerfile
target: development
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:9091/"]
interval: 10s
timeout: 3s
environment:
DB_HOST: ${DB_HOST:-db}
DB_PORT: ${DB_PORT:-5432}
DB_NAME: ${DB_NAME:-main}
DB_USER: ${DB_USER:-root}
DB_PASSWORD: ${DB_PASSWORD:-password}
ALLOWED_ORIGIN: ${ALLOWED_ORIGIN:-http://localhost:3000}
IDP_INTERNAL_URI: ${IDP_INTERNAL_URI:-http://keycloak:8080/realms/development}
IDP_EXTERNAL_URI: ${IDP_EXTERNAL_URI:-http://localhost:8080/realms/development}
SERVER_URL: ${SERVER_URL:-http://localhost:9091}
depends_on:
db:
condition: service_healthy
ports:
- "9091:9091"
volumes:
- ./server:/app
networks:
- server
realtime:
restart: always
build:
context: ./realtime
dockerfile: Dockerfile.local
environment:
REDIS_HOST: ${REDIS_HOST:-redis}
REDIS_PORT: ${REDIS_PORT:-6379}
ports:
- "9090:9090"
volumes:
- ./realtime:/app
networks:
- server
client:
restart: always
build:
context: ./client
dockerfile: Dockerfile.local
entrypoint: npm run dev
volumes:
- ./client:/app
- node-modules-client:/app/node_modules
healthcheck:
test: "curl -f http://localhost:3000 || exit 1"
interval: 5s
environment:
NEXT_PUBLIC_API_URL: ${NEXT_PUBLIC_API_URL:-http://localhost:9091}
NEXT_PUBLIC_BASE_URL: ${NEXT_PUBLIC_API_URL:-http://localhost:3000}
NEXT_PUBLIC_GENAI_URL: ${NEXT_PUBLIC_GENAI_URL:-http://localhost:8000}
NEXT_PUBLIC_REALTIME_URL: ${NEXT_PUBLIC_REALTIME_URL:-ws://localhost:9090}
NEXTAUTH_URL: ${NEXTAUTH_URL:-http://localhost:3000/api/auth/}
NEXTAUTH_SECRET: ${NEXTAUTH_SECRET:-feZJWB3mcQ93VBmqHKQI5er5NEIxcDPb3wtT/KaLB9s=}
KEYCLOAK_CLIENT_ID: ${KEYCLOAK_CLIENT_ID:-webclient}
KEYCLOAK_ISSUER: ${KEYCLOAK_ISSUER:-http://keycloak:8080/realms/development}
KEYCLOAK_END_SESSION_ENDPOINT: ${KEYCLOAK_END_SESSION_ENDPOINT:-http://keycloak:8080/realms/development/protocol/openid-connect/logout}
KEYCLOAK_CLIENT_SECRET: ${KEYCLOAK_CLIENT_SECRET:-SXiMvr1GG10bk2J63ODZC9SOaoAZ4dbe}
ports:
- "3000:3000"
networks:
- server
db:
restart: always
build:
context: ./docker/postgresql
dockerfile: Dockerfile
environment:
POSTGRES_USER: ${POSTGRES_USER:-root}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-password}
healthcheck:
test: [ "CMD-SHELL", "sh -c 'pg_isready -U root -d main'" ]
interval: 10s
timeout: 3s
retries: 3
ports:
- "5432:5432"
volumes:
- db-data:/var/lib/postgresql/data
networks:
- server
redis:
build:
context: ./docker/redis
dockerfile: Dockerfile
healthcheck:
test: [ "CMD-SHELL", "redis-cli ping | grep PONG" ]
interval: 1s
timeout: 3s
retries: 5
ports:
- "6379:6379"
command:
- redis-server
volumes:
- redis-data:/data
networks:
- server
redisinsight:
image: redis/redisinsight:latest
ports:
- "5540:5540"
volumes:
- redis-insight-data:/data
networks:
- server
genai:
restart: always
build:
context: ./genai
dockerfile: Dockerfile
ports:
- "8000:8000"
environment:
OPEN_WEB_UI_API_KEY: ${OPEN_WEB_UI_API_KEY}
SERVER_URL: ${SERVER_URL:-http://localhost:9091}
CLIENT_URL: ${CLIENT_URL:-http://localhost:3000}
GENAI_URL: ${GENAI_URL:-http://localhost:8000}
API_URL: ${API_URL:-https://gpu.aet.cit.tum.de/api/chat/completions}
volumes:
- ./genai:/app
networks:
- server
grafana:
restart: always
build:
context: ./docker/grafana
dockerfile: Dockerfile
ports:
- "3001:3000"
volumes:
- grafana-data:/var/lib/grafana
- ./docker/grafana/provisioning:/etc/grafana/provisioning:ro
environment:
- GF_SECURITY_ADMIN_USER=admin
- GF_SECURITY_ADMIN_PASSWORD=admin
- GF_USERS_ALLOW_SIGN_UP=false
- GF_FEATURE_TOGGLES_ENABLE=logsInExplore
- GF_LOG_CONSOLECOLORS=true
depends_on:
- prometheus
networks:
- server
prometheus:
restart: always
build:
context: ./docker/prometheus
dockerfile: Dockerfile
ports:
- "9092:9090"
volumes:
- ./docker/prometheus/config:/etc/prometheus
- prometheus-data:/prometheus
command:
- '--config.file=/etc/prometheus/prometheus.yml'
- '--storage.tsdb.path=/prometheus'
- '--web.console.libraries=/etc/prometheus/console_libraries'
- '--web.console.templates=/etc/prometheus/consoles'
- '--web.enable-lifecycle'
networks:
- server
alertmanager:
restart: always
build:
context: ./docker/alertmanager
dockerfile: Dockerfile
ports:
- "9093:9093"
volumes:
- ./docker/alertmanager/config.yml:/etc/alertmanager/config.yml:ro
- alertmanager-data:/alertmanager
command:
- '--config.file=/etc/alertmanager/config.yml'
- '--storage.path=/alertmanager'
- '--log.level=debug'
networks:
- server
networks:
server:
volumes:
db-data:
node-modules-client:
redis-data:
redis-insight-data:
grafana-data:
prometheus-data:
alertmanager-data: