перенос лабы 2

This commit is contained in:
2026-10-18 15:05:51 +03:00
parent 0ab3a341aa
commit 13ee5a0e56
44 changed files with 6402 additions and 8 deletions
+34 -5
View File
@@ -1,13 +1,42 @@
# Copy to .env for your LOCAL synthetic test environment; never commit .env.
# These are logical interface suggestions; map actual framework names in REPORT.md.
# The transferred lab2 baseline still needs its Compose topology adapted to lab3.
APP_HOST=0.0.0.0
APP_PORT=8080
APP_ENV=lab
POSTGRES_USER=messenger
POSTGRES_DB=messenger
SESSION_TTL_SECONDS=3600
# Choose credentials locally. File paths contain no secret values.
DATABASE_URL_FILE=/run/secrets/database_url
# Optional on 3, required use on 4 in lab2; Redis OR Valkey:
SESSION_STORE=postgres
CACHE_URL_FILE=/run/secrets/cache_url
API_REPLICAS=2
IDEMPOTENCY_TTL_SECONDS=86400
# File paths contain no secret values. Create the referenced local secret files
# according to REPORT.md; never commit their contents.
DATABASE_URL_FILE=/run/secrets/database_url
DB_MAX_CONNS=10
DB_MIN_CONNS=2
DB_MAX_CONN_LIFETIME=30m
DB_MAX_CONN_IDLE_TIME=5m
DB_HEALTH_CHECK_PERIOD=30s
DB_CONNECT_TIMEOUT=5s
DB_QUERY_TIMEOUT=3s
READINESS_TIMEOUT=2s
SHUTDOWN_TIMEOUT=10s
# Redis stores a disposable shared chat cache; PostgreSQL remains authoritative.
# The Go config accepts CACHE_URL or CACHE_URL_FILE, but never both. The
# transferred Compose baseline currently passes CACHE_URL directly.
CACHE_URL=redis://redis:6379/0
# CACHE_URL_FILE=/run/secrets/cache_url
CACHE_TTL=5m
CACHE_OPERATION_TIMEOUT=250ms
CACHE_POOL_SIZE=10
# Optional Redis Insight profile from the transferred baseline.
REDIS_INSIGHT_PORT=5540