chore(compose): enforce cpu and memory limits
This commit is contained in:
@@ -18,6 +18,14 @@ services:
|
||||
timeout: 3s
|
||||
retries: 10
|
||||
start_period: 5s
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: "1.0"
|
||||
memory: 1G
|
||||
reservations:
|
||||
cpus: "0.25"
|
||||
memory: 256M
|
||||
networks:
|
||||
- internal
|
||||
|
||||
@@ -40,6 +48,11 @@ services:
|
||||
timeout: 3s
|
||||
retries: 10
|
||||
start_period: 5s
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: "0.5"
|
||||
memory: 256M
|
||||
networks:
|
||||
- internal
|
||||
|
||||
@@ -57,6 +70,8 @@ services:
|
||||
depends_on:
|
||||
postgres:
|
||||
condition: service_healthy
|
||||
healthcheck:
|
||||
disable: true
|
||||
networks:
|
||||
- internal
|
||||
|
||||
@@ -74,6 +89,7 @@ services:
|
||||
SESSION_STORE: "redis"
|
||||
SESSION_TTL_SECONDS: "3600"
|
||||
IDEMPOTENCY_TTL_SECONDS: "86400"
|
||||
SHUTDOWN_DRAIN_SECONDS: "3"
|
||||
secrets:
|
||||
- database_url
|
||||
- cache_url
|
||||
@@ -95,6 +111,13 @@ services:
|
||||
start_period: 10s
|
||||
deploy:
|
||||
replicas: 2
|
||||
resources:
|
||||
limits:
|
||||
cpus: "0.5"
|
||||
memory: 256M
|
||||
reservations:
|
||||
cpus: "0.1"
|
||||
memory: 64M
|
||||
networks:
|
||||
- internal
|
||||
|
||||
|
||||
Reference in New Issue
Block a user