-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathcompose.yml
More file actions
58 lines (55 loc) · 1.6 KB
/
Copy pathcompose.yml
File metadata and controls
58 lines (55 loc) · 1.6 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
services:
api:
build:
context: .
dockerfile: api/Dockerfile
image: metawahl-api:dev
restart: unless-stopped
depends_on:
db:
condition: service_healthy
redis:
condition: service_started
environment:
METAWAHL_CONFIG: ${METAWAHL_CONFIG}
METAWAHL_SECRET: ${METAWAHL_SECRET}
METAWAHL_ADMIN_KEY: ${METAWAHL_ADMIN_KEY}
METAWAHL_DB_URL: ${METAWAHL_DB_URL}
CACHE_REDIS_URL: ${CACHE_REDIS_URL}
METAWAHL_API_LOGFILE: ${METAWAHL_API_LOGFILE}
ports:
- "127.0.0.1:3001:3001"
volumes:
- ./logs:/var/log/metawahl
- ./userdata:/app/userdata
- ./qual-o-mat-data:/app/qual-o-mat-data:ro
- ./wahlergebnisse:/app/wahlergebnisse:ro
client:
build:
context: ./client
target: prod
args:
VITE_API_ROOT: ${VITE_API_ROOT:-https://api.metawahl.de/v3}
image: metawahl-client:prod
restart: unless-stopped
ports:
- "127.0.0.1:8080:80"
db:
image: postgres:16-alpine
restart: unless-stopped
environment:
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
POSTGRES_DB: ${POSTGRES_DB}
volumes:
- ./data/pg:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U $${POSTGRES_USER} -d $${POSTGRES_DB}"]
interval: 5s
timeout: 3s
retries: 10
# DB port intentionally not published; reach it via `docker compose exec db psql`.
redis:
image: redis:7-alpine
restart: unless-stopped
command: ["redis-server", "--maxmemory", "128mb", "--maxmemory-policy", "allkeys-lru"]