-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcompose.yml
More file actions
181 lines (166 loc) · 4.58 KB
/
compose.yml
File metadata and controls
181 lines (166 loc) · 4.58 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
version: '3.8'
services:
client:
build: client
image: ghcr.io/aet-devops25/team-rest-in-peace/client:latest
container_name: client
env_file:
- .env
expose:
- "3000"
healthcheck:
test: "curl -f localhost:3000/health.html"
start_period: 5s
db:
image: ghcr.io/aet-devops25/team-rest-in-peace/database:latest
build: database
container_name: db
env_file:
- .env
expose:
- "5432"
volumes:
- postgres_data:/var/lib/postgresql/data
healthcheck:
test: [ "CMD-SHELL", "pg_isready -U $$POSTGRES_USER -d $$POSTGRES_DB" ]
start_period: 10s
data-fetching-service:
image: ghcr.io/aet-devops25/team-rest-in-peace/data-fetching-service:latest
build: data-fetching-service
container_name: data-fetching-service
ports:
- "8080:8080"
env_file:
- .env
expose:
- "8080"
healthcheck:
test: "curl -f localhost:8080/health"
start_period: 5s
depends_on:
- db
initial-data-fetch:
image: curlimages/curl:7.85.0
depends_on:
data-fetching-service:
condition: service_healthy
command: [ "curl", "-X", "GET", "http://data-fetching-service:8080/fetch?f.datum.start=2025-07-01&f.wahlperiode=21" ]
restart: "no"
browsing-service:
image: ghcr.io/aet-devops25/team-rest-in-peace/browsing-service:latest
build: browsing-service
ports:
- "8081:8081"
container_name: browsing-service
env_file:
- .env
expose:
- "8081"
healthcheck:
test: "curl -f localhost:8081/health"
start_period: 5s
depends_on:
- db
notification-service:
image: ghcr.io/aet-devops25/team-rest-in-peace/notification-service:latest
build: notification-service
ports:
- "8082:8082"
container_name: notification-service
env_file:
- .env
expose:
- "8082"
healthcheck:
test: "curl -f localhost:8082/health"
start_period: 5s
depends_on:
- db
genai-service:
image: ghcr.io/aet-devops25/team-rest-in-peace/genai-service:latest
build: genai-service
container_name: genai-service
env_file:
- .env
expose:
- "8000"
healthcheck:
test: [ "CMD-SHELL", "python3 app/healthcheck.py" ]
start_period: 5s
depends_on:
- db
nginx:
image: nginx:latest
container_name: nginx
ports:
- "80:80"
volumes:
- ./nginx/nginx.conf:/etc/nginx/nginx.conf:ro
- ./nginx/conf.d:/etc/nginx/conf.d:ro
depends_on:
- client
- data-fetching-service
- browsing-service
- notification-service
- grafana
prometheus:
image: prom/prometheus:v2.52.0
container_name: prometheus
ports:
- "${PROMETHEUS_PORT}:9090"
volumes:
- ./prometheus/prometheus.docker.yml:/etc/prometheus/prometheus.yml:ro
- 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'
restart: unless-stopped
grafana:
image: grafana/grafana-oss:latest
container_name: grafana
ports:
- "${GRAFANA_PORT}:3000"
volumes:
- grafana-storage:/var/lib/grafana
- ./grafana/provisioning:/etc/grafana/provisioning:ro
environment:
- GF_SECURITY_ADMIN_USER=${GRAFANA_ADMIN_USER}
- GF_SECURITY_ADMIN_PASSWORD=${GRAFANA_ADMIN_PASSWORD}
- GF_USERS_ALLOW_SIGN_UP=false
- GF_FEATURE_TOGGLES_ENABLE=logsInExplore
- GF_LOG_CONSOLECOLORS=true
- GF_UNIFIED_ALERTING_ENABLED=true
- PROMETHEUS_URL=http://prometheus:${PROMETHEUS_PORT}
- LOKI_URL=http://loki:${LOKI_PORT}
- GF_SECURITY_ALLOW_ORIGIN=http://localhost
# entrypoint: ["sh", "-c", "/etc/grafana/provisioning/init_grafana.sh"]
depends_on:
- prometheus
- loki
restart: unless-stopped
promtail:
image: grafana/promtail:latest
volumes:
- /var/lib/docker/containers:/var/lib/docker/containers:ro
- ./promtail/promtail.yml:/etc/promtail/promtail.yml
command: -config.file=/etc/promtail/promtail.yml
depends_on:
- loki
restart: unless-stopped
loki:
image: grafana/loki:2.9.0
ports:
- "${LOKI_PORT}:9092"
volumes:
- ./loki/loki-config.yaml:/etc/loki/loki-config.yaml:ro
command: -config.file=/etc/loki/loki-config.yaml
restart: unless-stopped
volumes:
postgres_data:
prometheus_data:
grafana-storage:
loki-storage:
promtail-storage: