Skip to content

Commit

Permalink
chore: limit memory and cpu usage for containers
Browse files Browse the repository at this point in the history
  • Loading branch information
eduardoconti committed Jan 7, 2024
1 parent 51d89b6 commit 0214f4c
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ services:
command: yarn start:api:dev
depends_on:
- rabbitmq
cpus: 0.1
mem_limit: 256M

consumer:
restart: on-failure
Expand All @@ -28,6 +30,8 @@ services:
deploy:
mode: replicated
replicas: 3
cpus: 0.1
mem_limit: 256M

rabbitmq:
image: rabbitmq:3.9-management
Expand All @@ -38,7 +42,9 @@ services:
- 5672:5672
- 15672:15672
volumes:
- rabbitmq_data:/var/lib/rabbitmq
- rabbitmq_data:/var/lib/rabbitmq
cpus: 0.1
mem_limit: 256M

volumes:
rabbitmq_data:

0 comments on commit 0214f4c

Please sign in to comment.