-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
102 lines (98 loc) · 2.97 KB
/
Copy pathdocker-compose.yml
File metadata and controls
102 lines (98 loc) · 2.97 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
services:
postgres:
image: postgres:16-alpine
container_name: conduct-postgres
environment:
POSTGRES_USER: conduct
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:?set POSTGRES_PASSWORD in .env}
POSTGRES_DB: conduct
ports:
- "5432:5432"
volumes:
- conduct-postgres-data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U conduct"]
interval: 5s
timeout: 3s
retries: 10
restart: unless-stopped
redis:
image: redis:7-alpine
container_name: conduct-redis
ports:
- "6379:6379"
volumes:
- conduct-redis-data:/data
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 5s
timeout: 3s
retries: 10
restart: unless-stopped
api:
build:
context: .
args:
GIT_SHA: ${GIT_SHA:-}
image: conduct:local
container_name: conduct-api
# --proxy-headers + forwarded-allow-ips=* so uvicorn honors ngrok's
# X-Forwarded-Proto (TLS terminates at the edge); without it, redirects
# like /mcp -> /mcp/ downgrade to http and MCP clients balk.
command: ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8000", "--proxy-headers", "--forwarded-allow-ips", "*"]
env_file: .env
environment:
DATABASE_URL: postgresql+asyncpg://conduct:${POSTGRES_PASSWORD}@postgres:5432/conduct
REDIS_URL: redis://redis:6379/0
OLLAMA_BASE_URL: http://host.docker.internal:11434
OTEL_EXPORTER_OTLP_ENDPOINT: http://host.docker.internal:4317
TTS_VOICES_DIR: /app/voices
TTS_OUTPUT_DIR: /app/output
extra_hosts:
- "host.docker.internal:host-gateway"
ports:
- "8000:8000"
volumes:
# Voice files (read-only) and generated MP3s (read-write). Both kept on
# the host so they survive container recreates and can be rsync'd by
# other LAN machines without going through the API.
- ./voices:/app/voices:ro
- ./output:/app/output
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
restart: unless-stopped
worker:
build:
context: .
args:
GIT_SHA: ${GIT_SHA:-}
image: conduct:local
container_name: conduct-worker
command: ["python", "-m", "worker.queue"]
env_file: .env
environment:
DATABASE_URL: postgresql+asyncpg://conduct:${POSTGRES_PASSWORD}@postgres:5432/conduct
REDIS_URL: redis://redis:6379/0
OLLAMA_BASE_URL: http://host.docker.internal:11434
OTEL_EXPORTER_OTLP_ENDPOINT: http://host.docker.internal:4317
TTS_VOICES_DIR: /app/voices
TTS_OUTPUT_DIR: /app/output
extra_hosts:
- "host.docker.internal:host-gateway"
ports:
- "8001:8001"
volumes:
- ./voices:/app/voices:ro
- ./output:/app/output
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
restart: unless-stopped
volumes:
conduct-postgres-data:
conduct-redis-data: