Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: limit resources of docker compose services #460

Merged
merged 1 commit into from
Jul 31, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ services:
context: ./
dockerfile: Dockerfile
restart: unless-stopped
deploy:
resources:
limits:
memory: 1G
depends_on:
- celery
- redis
Expand All @@ -31,6 +35,10 @@ services:
depends_on:
- redis
- postgres
deploy:
resources:
limits:
memory: 8G
entrypoint:
[
"mamba",
Expand All @@ -55,6 +63,10 @@ services:
context: ./
dockerfile: Dockerfile
restart: unless-stopped
deploy:
resources:
limits:
memory: 1G
ports:
- "5555:5555"
depends_on:
Expand All @@ -75,6 +87,10 @@ services:
# Message broker
image: redis:7
restart: unless-stopped
deploy:
resources:
limits:
memory: 2G
ports:
- "127.0.0.1:6379:6379"
# Start with persistent storage
Expand All @@ -86,6 +102,10 @@ services:
# Result backend
image: postgres:15
restart: unless-stopped
deploy:
resources:
limits:
memory: 3G
environment:
POSTGRES_PASSWORD: smt
POSTGRES_USER: smt
Expand Down
Loading