adjusts resource limits

This commit is contained in:
Your Name
2026-07-08 22:22:09 +00:00
parent 2c66a802c0
commit bd6ad6009a
2 changed files with 22 additions and 12 deletions
+10 -5
View File
@@ -12,7 +12,7 @@ services:
- pgdata:/var/lib/postgresql/data - pgdata:/var/lib/postgresql/data
- pgsocket:/var/run/postgresql - pgsocket:/var/run/postgresql
healthcheck: healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"] test: [ "CMD-SHELL", "pg_isready -U postgres" ]
interval: 5s interval: 5s
timeout: 5s timeout: 5s
retries: 5 retries: 5
@@ -28,8 +28,8 @@ services:
KMTN_DATABASE_URL: >- KMTN_DATABASE_URL: >-
postgresql+asyncpg://postgres:postgres@/kmountain?host=/var/run/postgresql postgresql+asyncpg://postgres:postgres@/kmountain?host=/var/run/postgresql
KMTN_CORS_ORIGINS: '["http://localhost:4200", "http://localhost"]' KMTN_CORS_ORIGINS: '["http://localhost:4200", "http://localhost"]'
KMTN_ADMIN_USERNAME : "admin" KMTN_ADMIN_USERNAME: "admin"
KMTN_ADMIN_PASSWORD : "123" KMTN_ADMIN_PASSWORD: "123"
KMTN_STATIC_UPSTREAM_URL: http://frontend:80 KMTN_STATIC_UPSTREAM_URL: http://frontend:80
volumes: volumes:
- pgsocket:/var/run/postgresql - pgsocket:/var/run/postgresql
@@ -63,8 +63,13 @@ services:
dockerfile: Dockerfile dockerfile: Dockerfile
platform: linux/amd64 platform: linux/amd64
restart: unless-stopped restart: unless-stopped
mem_limit: 16g resources:
mem_reservation: 8g limits:
cpus: '4.0'
memory: 16g
reservations:
cpus: '2.0'
memory: 8g
expose: expose:
- "22" - "22"
volumes: volumes:
+10 -5
View File
@@ -12,7 +12,7 @@ services:
- pgdata:/var/lib/postgresql/data - pgdata:/var/lib/postgresql/data
- pgsocket:/var/run/postgresql - pgsocket:/var/run/postgresql
healthcheck: healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"] test: [ "CMD-SHELL", "pg_isready -U postgres" ]
interval: 5s interval: 5s
timeout: 5s timeout: 5s
retries: 5 retries: 5
@@ -28,8 +28,8 @@ services:
KMTN_DATABASE_URL: >- KMTN_DATABASE_URL: >-
postgresql+asyncpg://postgres:postgres@/kmountain?host=/var/run/postgresql postgresql+asyncpg://postgres:postgres@/kmountain?host=/var/run/postgresql
KMTN_CORS_ORIGINS: '["http://localhost:4200", "http://localhost"]' KMTN_CORS_ORIGINS: '["http://localhost:4200", "http://localhost"]'
KMTN_ADMIN_USERNAME : "admin" KMTN_ADMIN_USERNAME: "admin"
KMTN_ADMIN_PASSWORD : "123" KMTN_ADMIN_PASSWORD: "123"
KMTN_STATIC_UPSTREAM_URL: http://frontend:80 KMTN_STATIC_UPSTREAM_URL: http://frontend:80
volumes: volumes:
- pgsocket:/var/run/postgresql - pgsocket:/var/run/postgresql
@@ -63,8 +63,13 @@ services:
dockerfile: Dockerfile dockerfile: Dockerfile
platform: linux/amd64 platform: linux/amd64
restart: unless-stopped restart: unless-stopped
mem_limit: 16g resources:
mem_reservation: 8g limits:
cpus: '4.0'
memory: 16g
reservations:
cpus: '2.0'
memory: 8g
expose: expose:
- "22" - "22"
volumes: volumes: