-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
173 lines (165 loc) · 4.48 KB
/
Copy pathdocker-compose.yml
File metadata and controls
173 lines (165 loc) · 4.48 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
services:
# ─── Databases ───
postgres:
image: postgres:16
restart: unless-stopped
environment:
POSTGRES_DB: trialpulse
POSTGRES_USER: tp_admin
POSTGRES_PASSWORD: tp_hackathon_2026
volumes:
- pgdata:/var/lib/postgresql/data
- ./db/init.sql:/docker-entrypoint-initdb.d/01-schema.sql
- ./db/seed.sql:/docker-entrypoint-initdb.d/02-seed.sql
ports:
- "5432:5432"
healthcheck:
test: ["CMD-SHELL", "pg_isready -U tp_admin -d trialpulse"]
interval: 5s
timeout: 5s
retries: 5
start_period: 10s
redis:
image: redis:7-alpine
restart: unless-stopped
ports:
- "6379:6379"
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 5s
timeout: 5s
retries: 5
start_period: 5s
minio:
image: minio/minio:latest
restart: unless-stopped
command: server /data --console-address ":9001"
environment:
MINIO_ROOT_USER: trialpulse
MINIO_ROOT_PASSWORD: tp_hackathon_2026
volumes:
- minio_data:/data
ports:
- "9000:9000"
- "9001:9001"
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:9000/minio/health/live"]
interval: 10s
timeout: 5s
retries: 5
start_period: 10s
# ─── LiveKit Server (self-hosted) ───
livekit:
image: livekit/livekit-server:latest
restart: unless-stopped
command: --config /etc/livekit.yaml
volumes:
- ./infra/livekit.yaml:/etc/livekit.yaml
ports:
- "7880:7880"
- "7881:7881"
- "7882:7882/udp"
depends_on:
redis:
condition: service_healthy
# ─── Python FastAPI Backend ───
backend:
build:
context: ./backend
dockerfile: Dockerfile
restart: unless-stopped
env_file:
- .env
environment:
DATABASE_URL: postgresql+asyncpg://tp_admin:tp_hackathon_2026@postgres:5432/trialpulse
REDIS_URL: redis://redis:6379
MINIO_ENDPOINT: minio:9000
MINIO_ACCESS_KEY: trialpulse
MINIO_SECRET_KEY: tp_hackathon_2026
LIVEKIT_URL: ws://livekit:7880
LIVEKIT_CLIENT_URL: ws://localhost:7880
LIVEKIT_API_KEY: devkey
LIVEKIT_API_SECRET: devsecret
ENVIRONMENT: development
ports:
- "8000:8000"
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8000/api/v1/health"]
interval: 10s
timeout: 5s
retries: 5
start_period: 15s
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
livekit:
condition: service_started
volumes:
- ./backend:/app
# ─── LiveKit Voice Agent Worker ───
voice-agent:
build:
context: ./backend
dockerfile: Dockerfile
restart: unless-stopped
command: ["python", "scripts/run_voice_worker.py", "dev"]
env_file:
- .env
environment:
DATABASE_URL: postgresql+asyncpg://tp_admin:tp_hackathon_2026@postgres:5432/trialpulse
REDIS_URL: redis://redis:6379
LIVEKIT_URL: ws://livekit:7880
LIVEKIT_API_KEY: devkey
LIVEKIT_API_SECRET: devsecret
depends_on:
postgres:
condition: service_healthy
livekit:
condition: service_started
# ─── Researcher Web Dashboard ───
dashboard:
build:
context: ./apps/dashboard
dockerfile: Dockerfile
restart: unless-stopped
ports:
- "5173:5173"
environment:
# Tell Vite proxy to route /api requests to the backend container
VITE_BACKEND_URL: http://backend:8000
depends_on:
backend:
condition: service_healthy
volumes:
# Mount the code for live-reloading during development
- ./apps/dashboard:/app
# Exclude node_modules to use the container's version
- /app/node_modules
healthcheck:
test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:5173"]
interval: 10s
timeout: 5s
retries: 5
start_period: 15s
# ─── Nginx Reverse Proxy ───
nginx:
image: nginx:alpine
restart: unless-stopped
volumes:
- ./infra/nginx.dev.conf:/etc/nginx/nginx.conf:ro
ports:
- "8080:8080"
depends_on:
backend:
condition: service_healthy
healthcheck:
test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:8080/health"]
interval: 10s
timeout: 5s
retries: 5
start_period: 10s
volumes:
pgdata:
minio_data: