Skip to content

Commit 8854289

Browse files
baijumclaude
andcommitted
feat: add per-app resource limits to Docker Compose
Add CPU and memory limits/reservations for app (512M/0.5CPU) and celery-worker (256M/0.25CPU) services to prevent resource contention in multi-app deployments. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent d395e45 commit 8854289

1 file changed

Lines changed: 16 additions & 0 deletions

File tree

deploy/docker-compose.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,14 @@ services:
1414
restart: unless-stopped
1515
networks:
1616
- towlion
17+
deploy:
18+
resources:
19+
limits:
20+
cpus: '0.50'
21+
memory: 512M
22+
reservations:
23+
cpus: '0.25'
24+
memory: 256M
1725

1826
celery-worker:
1927
build:
@@ -25,6 +33,14 @@ services:
2533
restart: unless-stopped
2634
networks:
2735
- towlion
36+
deploy:
37+
resources:
38+
limits:
39+
cpus: '0.25'
40+
memory: 256M
41+
reservations:
42+
cpus: '0.10'
43+
memory: 128M
2844

2945
networks:
3046
towlion:

0 commit comments

Comments
 (0)