Add resource limits and reservations to services

Added deployment resource limits and reservations.
This commit is contained in:
jackjk521 2026-04-13 00:57:08 +08:00 committed by GitHub
parent fa0f6519b1
commit d8d3455992
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 9 additions and 1 deletions

View File

@ -11,4 +11,12 @@ services:
- "5001:5001"
restart: unless-stopped
volumes:
- ./backend/uploads:/app/backend/uploads
- ./backend/uploads:/app/backend/uploads
# Add to each service in docker-compose.yml
deploy:
resources:
limits:
cpus: '2.0'
memory: 4G
reservations:
memory: 1G