-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcompose.yaml
More file actions
122 lines (116 loc) · 2.78 KB
/
compose.yaml
File metadata and controls
122 lines (116 loc) · 2.78 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
# Copyright © TUM AET 2025 - 2025
#
# Licensed under the MIT License
#
# Authors: Benedikt Hofmann, Patrick Stoeckle, and other contributors
#
# SPDX-FileCopyrightText: 2025 TUM AET
#
# SPDX-License-Identifier: MIT
services:
server:
image: ghcr.io/aet-devops25/w09-solution/server:latest
build:
context: ./server
dockerfile: Dockerfile
environment:
- SPRING_PROFILES_ACTIVE=docker
- DATABASE_URL=jdbc:postgresql://database:5432/mensa
- LLM_SERVICE_URL=http://llm:5000
ports:
- "127.0.0.1:8080:8080"
restart: unless-stopped
depends_on:
database:
condition: service_healthy
llm:
condition: service_healthy
security_opt:
- no-new-privileges:true
cap_drop:
- ALL
healthcheck:
test: ["CMD", "wget", "--spider", "--quiet", "http://localhost:8080/api/actuator/health"]
interval: 30s
timeout: 10s
retries: 5
networks:
- mensanet
database:
image: postgres:17
ports:
- "127.0.0.1:5432:5432"
environment:
- POSTGRES_USER=${POSTGRES_USER:-postgres}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD:-supersecret}
- POSTGRES_DB=${POSTGRES_DB:-mensa}
volumes:
- db_data:/var/lib/postgresql/data
restart: unless-stopped
security_opt:
- no-new-privileges:true
cap_drop:
- ALL
cap_add:
- CHOWN
- FOWNER
- DAC_OVERRIDE
- SETUID
- SETGID
healthcheck:
test: ["CMD", "pg_isready", "-U", "${POSTGRES_USER:-postgres}"]
interval: 5s
timeout: 5s
retries: 5
networks:
- mensanet
client:
image: ghcr.io/aet-devops25/w09-solution/client:latest
build:
context: ./client
dockerfile: Dockerfile
ports:
- "127.0.0.1:3000:3000"
environment:
- PUBLIC_API_URL=${PUBLIC_API_URL:-http://127.0.0.1:8080/api}
depends_on:
server:
condition: service_healthy
restart: unless-stopped
security_opt:
- no-new-privileges:true
cap_drop:
- ALL
healthcheck:
test: ["CMD", "wget", "--spider", "--quiet", "http://localhost:3000"]
interval: 30s
timeout: 10s
retries: 5
networks:
- mensanet
llm:
image: ghcr.io/aet-devops25/w09-solution/llm:latest
build:
context: ./llm
dockerfile: Dockerfile
environment:
- CHAIR_API_KEY=${CHAIR_API_KEY:-your_api_key_here}
ports:
- "127.0.0.1:5000:5000"
restart: unless-stopped
security_opt:
- no-new-privileges:true
cap_drop:
- ALL
healthcheck:
test: ["CMD", "wget", "--spider", "--quiet", "http://localhost:5000/health"]
interval: 30s
timeout: 10s
retries: 5
networks:
- mensanet
volumes:
db_data:
networks:
mensanet:
driver: bridge