-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
121 lines (102 loc) · 2.66 KB
/
docker-compose.yml
File metadata and controls
121 lines (102 loc) · 2.66 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
version: '3.8'
services:
podcast-rag:
image: allenhutchison/podcast-rag:latest
container_name: podcast-rag
restart: unless-stopped
# Environment variables
env_file:
- .env
environment:
- PODCAST_DOWNLOAD_DIRECTORY=/data/podcasts
- PYTHONUNBUFFERED=1
# Volume mounts
volumes:
# Podcast files (read-only recommended)
- /opt/podcasts:/data/podcasts:ro # Edit this path to your podcast directory
# Optional: Mount custom .env if not using env_file
# - ./.env:/app/.env:ro
# Resource limits (adjust based on your needs)
deploy:
resources:
limits:
cpus: '2.0'
memory: 4G
reservations:
cpus: '0.5'
memory: 1G
# Logging
logging:
driver: json-file
options:
max-size: "10m"
max-file: "3"
# Health check
healthcheck:
test: ["CMD", "python", "-c", "import sys; sys.exit(0)"]
interval: 30s
timeout: 10s
retries: 3
start_period: 10s
podcast-rag-web:
image: allenhutchison/podcast-rag-web:latest
container_name: podcast-rag-web
restart: unless-stopped
# Port mapping
ports:
- "8080:8080"
# Environment variables
env_file:
- .env
environment:
- PODCAST_DOWNLOAD_DIRECTORY=/data/podcasts
- PYTHONUNBUFFERED=1
- PORT=8080
# Volume mounts (shared with encoding backend)
volumes:
# Podcast files (read-only)
- /opt/podcasts:/data/podcasts:ro # Edit this path to your podcast directory
# Resource limits (web service needs less than encoding)
deploy:
resources:
limits:
cpus: '1.0'
memory: 2G
reservations:
cpus: '0.25'
memory: 512M
# Logging
logging:
driver: json-file
options:
max-size: "10m"
max-file: "3"
# Health check
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8080/health"]
interval: 30s
timeout: 10s
retries: 3
start_period: 15s
# Optional: One-off query service
podcast-rag-query:
build:
context: .
dockerfile: Dockerfile
container_name: podcast-rag-query
profiles:
- manual # Only start manually with --profile manual
env_file:
- .env
environment:
- PODCAST_DOWNLOAD_DIRECTORY=/data/podcasts
volumes:
- /opt/podcasts:/data/podcasts:ro # Edit this path to your podcast directory
# Override entrypoint for interactive queries
entrypoint: []
command: ["sleep", "infinity"]
logging:
driver: json-file
options:
max-size: "5m"
max-file: "2"