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