📦 build: add memory limit and session safeguard settings

This commit is contained in:
2026-07-16 21:58:55 +07:00
parent 9995557ae2
commit 2e320b03f3
2 changed files with 7 additions and 0 deletions
+6
View File
@@ -26,12 +26,16 @@ FORCE_GRAYSCALE=false
# Max rendered width/height in characters.
MAX_DIMENSION=512
# Max rendered area (columns x rows); larger terminals are scaled down.
MAX_TERMINAL_CELLS=256000
# Memory budget in MB for the rendered-frame cache (0 disables caching).
RENDER_CACHE_MB=256
# Go soft memory limit; set below your container limit to avoid OOM kills.
GOMEMLIMIT=1GiB
# Docker Compose container memory limit. Leave headroom for mapped frame files.
MEMORY_LIMIT=2g
# Connection limits. New connections over a limit are dropped immediately.
# Max simultaneous connections from a single client IP.
@@ -43,6 +47,8 @@ MAX_TOTAL_CONNECTIONS=1000
MAX_AUTH_ATTEMPTS=3
# SSH handshake deadline in ms (0 to disable).
HANDSHAKE_TIMEOUT=30000
# Maximum session lifetime in ms (0 to disable).
SESSION_TIMEOUT=600000
# Log attempted usernames/passwords.
LOG_CREDENTIALS=true