-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.prod.yml
More file actions
149 lines (138 loc) · 3.52 KB
/
Copy pathdocker-compose.prod.yml
File metadata and controls
149 lines (138 loc) · 3.52 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
# OpenAudio Production Overrides
# Use with: docker compose -f docker-compose.yml -f docker-compose.prod.yml up
#
# This file contains ONLY production-specific settings:
# - Pull pre-built images from Docker Hub (no build contexts)
# - Production volume configurations
# - Resource limits for stability
#
# Version pinning: Set IMAGE_TAG in .env (e.g., IMAGE_TAG=1.0) to pin a release.
# Default: latest
#
# GPU Runtime: To enable GPU acceleration, also load docker-compose.gpu.yml:
# docker compose -f docker-compose.yml -f docker-compose.prod.yml -f docker-compose.gpu.yml up
services:
backend:
image: davidamacey/openaudio-backend:${IMAGE_TAG:-latest}
pull_policy: always
environment:
- LOG_LEVEL=INFO
deploy:
resources:
limits:
memory: 4G
reservations:
memory: 1G
celery-torch-worker:
image: davidamacey/openaudio-torch:${IMAGE_TAG:-latest}
pull_policy: always
volumes:
- ${MODEL_CACHE_DIR:-./models}/huggingface:/home/openaudio/.cache/huggingface
- ${MODEL_CACHE_DIR:-./models}/torch:/home/openaudio/.cache/torch
environment:
- LOG_LEVEL=INFO
deploy:
resources:
limits:
memory: 16G
reservations:
memory: 4G
celery-sam-worker:
image: davidamacey/openaudio-sam:${IMAGE_TAG:-latest}
pull_policy: always
volumes:
- ${MODEL_CACHE_DIR:-./models}/huggingface:/home/openaudio/.cache/huggingface
- ${MODEL_CACHE_DIR:-./models}/torch:/home/openaudio/.cache/torch
environment:
- LOG_LEVEL=INFO
deploy:
resources:
limits:
memory: 16G
reservations:
memory: 4G
celery-enhance-worker:
image: davidamacey/openaudio-enhance:${IMAGE_TAG:-latest}
pull_policy: always
environment:
- LOG_LEVEL=INFO
deploy:
resources:
limits:
memory: 4G
reservations:
memory: 1G
celery-cpu-worker:
image: davidamacey/openaudio-backend:${IMAGE_TAG:-latest}
pull_policy: always
environment:
- LOG_LEVEL=INFO
deploy:
resources:
limits:
memory: 4G
reservations:
memory: 1G
celery-beat:
image: davidamacey/openaudio-backend:${IMAGE_TAG:-latest}
pull_policy: always
environment:
- LOG_LEVEL=INFO
deploy:
resources:
limits:
memory: 512M
reservations:
memory: 128M
frontend:
image: davidamacey/openaudio-frontend:${IMAGE_TAG:-latest}
pull_policy: always
ports:
- "${FRONTEND_PORT:-5473}:8080"
environment:
- NODE_ENV=production
healthcheck:
test: ["CMD", "wget", "--spider", "-q", "http://127.0.0.1:8080"]
interval: 10s
timeout: 5s
retries: 5
start_period: 30s
deploy:
resources:
limits:
memory: 512M
reservations:
memory: 128M
flower:
image: davidamacey/openaudio-backend:${IMAGE_TAG:-latest}
pull_policy: always
environment:
- LOG_LEVEL=INFO
deploy:
resources:
limits:
memory: 512M
reservations:
memory: 128M
# Infrastructure services resource limits
postgres:
deploy:
resources:
limits:
memory: 2G
reservations:
memory: 512M
redis:
deploy:
resources:
limits:
memory: 1G
reservations:
memory: 256M
minio:
deploy:
resources:
limits:
memory: 2G
reservations:
memory: 512M