-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
72 lines (69 loc) · 1.85 KB
/
Copy pathdocker-compose.yml
File metadata and controls
72 lines (69 loc) · 1.85 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
services:
# PostgreSQL Datenbank (Für Prisma ORM)
postgres:
image: postgres:16-alpine
container_name: arsnova-v3-postgres
restart: always
environment:
POSTGRES_USER: arsnova_user
POSTGRES_PASSWORD: secretpassword
POSTGRES_DB: arsnova_v3_dev
ports:
- '5432:5432'
volumes:
- postgres_data:/var/lib/postgresql/data
healthcheck:
test: ['CMD-SHELL', 'pg_isready -U arsnova_user -d arsnova_v3_dev']
interval: 5s
timeout: 5s
retries: 5
# Redis (Für tRPC Pub/Sub & WebSockets)
redis:
image: redis:7.4-alpine
container_name: arsnova-v3-redis
restart: always
ports:
- '6379:6379'
volumes:
- redis_data:/data
command: redis-server --appendonly yes --appendfsync everysec --save 60 1 --loglevel warning
healthcheck:
test: ['CMD', 'redis-cli', 'ping']
interval: 5s
timeout: 5s
retries: 5
# Backend + Frontend (Multi-Stage Dockerfile)
app:
build:
context: .
dockerfile: Dockerfile
container_name: arsnova-v3-app
restart: always
ports:
- '3000:3000'
- '3001:3001'
- '3002:3002'
environment:
DATABASE_URL: 'postgresql://arsnova_user:secretpassword@postgres:5432/arsnova_v3_dev?schema=public'
REDIS_URL: 'redis://redis:6379'
PORT: '3000'
HOST: '0.0.0.0'
WS_PORT: '3001'
YJS_WS_PORT: '3002'
NODE_ENV: 'production'
PUBLIC_FRONTEND_URL: 'http://127.0.0.1:3000'
PLAYWRIGHT_CHROMIUM_EXECUTABLE_PATH: '/usr/bin/chromium'
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
healthcheck:
test: ['CMD', 'wget', '-qO-', 'http://localhost:3000/trpc/health.check']
interval: 30s
timeout: 5s
start_period: 15s
retries: 3
volumes:
postgres_data:
redis_data: