оценка 4

This commit is contained in:
2026-10-23 16:20:43 +03:00
parent 34618bd423
commit 5300a1a1e0
18 changed files with 1861 additions and 29 deletions
+35
View File
@@ -21,6 +21,11 @@ services:
start_period: 3s
stop_grace_period: 10s
restart: unless-stopped
deploy:
resources:
limits:
cpus: "0.25"
memory: 128M
postgres:
image: postgres:16.15-alpine3.24@sha256:721873c34ceb9f8d8fc265984940dc982404c105f19ad51be9fdc5970a6080ea
@@ -43,6 +48,11 @@ services:
retries: 10
start_period: 5s
restart: unless-stopped
deploy:
resources:
limits:
cpus: "1.00"
memory: 512M
redis:
image: redis:8.10.2-alpine3.23@sha256:3811787313eba226a2ef38658c6ccb91cd5e110edc89c37767de373120a0e5a0
@@ -66,6 +76,11 @@ services:
start_period: 3s
stop_grace_period: 10s
restart: unless-stopped
deploy:
resources:
limits:
cpus: "0.25"
memory: 128M
migrate:
image: migrate/migrate:v4.20.1@sha256:76cc2074cb6642631f34a898ced71e6aeaa6b1a4d78c4daa743275a22e0c5be7
@@ -84,6 +99,11 @@ services:
postgres:
condition: service_healthy
restart: "no"
deploy:
resources:
limits:
cpus: "0.25"
memory: 64M
api:
build:
@@ -116,6 +136,7 @@ services:
DB_QUERY_TIMEOUT: ${DB_QUERY_TIMEOUT:-3s}
READINESS_TIMEOUT: ${READINESS_TIMEOUT:-2s}
SHUTDOWN_DRAIN_DELAY: ${SHUTDOWN_DRAIN_DELAY:-2s}
SHUTDOWN_TIMEOUT: ${SHUTDOWN_TIMEOUT:-10s}
secrets:
- database_url
@@ -131,6 +152,10 @@ services:
condition: service_completed_successfully
deploy:
replicas: ${API_REPLICAS:-2}
resources:
limits:
cpus: "${API_CPU_LIMIT:-0.50}"
memory: ${API_MEMORY_LIMIT:-256M}
healthcheck:
test:
[
@@ -155,6 +180,11 @@ services:
redis:
condition: service_healthy
restart: unless-stopped
deploy:
resources:
limits:
cpus: "0.50"
memory: 256M
postgres-restore:
image: postgres:16.15-alpine3.24@sha256:721873c34ceb9f8d8fc265984940dc982404c105f19ad51be9fdc5970a6080ea
@@ -178,6 +208,11 @@ services:
retries: 10
start_period: 5s
restart: "no"
deploy:
resources:
limits:
cpus: "1.00"
memory: 512M
volumes:
postgres_data: