perf(docker): бандл API, brotli-статика, wget-healthcheck, лимиты ресурсов, вендорные чанки web

This commit is contained in:
Denozordec committed 2026-10-23 17:01:02 +07:00
1 parent 1d7ea35a23
commit 8298454c63
10 files changed
+244 -20

No files matched your search

+13 -1
View File
@@ -25,8 +25,20 @@ services:
restart: unless-stopped
init: true
stop_grace_period: 15s
# Лимиты ресурсов: heap Node (NODE_OPTIONS в образе) рассчитан на 256 МиБ.
mem_limit: 256m
memswap_limit: 256m
cpus: "1.0"
pids_limit: 128
read_only: true
tmpfs:
- /tmp
cap_drop:
- ALL
security_opt:
- no-new-privileges:true
healthcheck:
test: ["CMD", "node", "-e", "fetch('http://127.0.0.1:8080/health').then(r=>process.exit(r.ok?0:1)).catch(()=>process.exit(1))"]
test: ["CMD", "wget", "-q", "-O", "/dev/null", "http://127.0.0.1:8080/health"]
interval: 30s
timeout: 5s
retries: 3