Перенес необходимые изменения из лабораторной работы №2

This commit is contained in:
Grbisba
2026-11-06 14:27:27 +03:00
parent 0ab3a341aa
commit 4c066ff191
92 changed files with 7156 additions and 7 deletions
+56 -6
View File
@@ -1,9 +1,3 @@
# Copy to .env for your LOCAL synthetic test environment; never commit .env.
# These are logical interface suggestions; map actual framework names in REPORT.md.
APP_HOST=0.0.0.0
APP_PORT=8080
APP_ENV=lab
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:
@@ -11,3 +5,59 @@ SESSION_STORE=postgres
CACHE_URL_FILE=/run/secrets/cache_url
API_REPLICAS=2
IDEMPOTENCY_TTL_SECONDS=86400
# Copy to .env and replace both password placeholders for a local synthetic stand.
# Never commit .env. Existing .env files must be updated manually; see REPORT.md.
HOST_PORT=8080
APP_ENABLED=true
APP_HOST=0.0.0.0
APP_PORT=8080
APP_READ_TIMEOUT=5s
APP_WRITE_TIMEOUT=10s
APP_IDLE_TIMEOUT=60s
APP_SHUTDOWN_TIMEOUT=8s
APPLICATION_LOG_LEVEL=info
APPLICATION_ENVIRONMENT=dev
APPLICATION_SHUTDOWN_TIMEOUT=8s
APPLICATION_REQUEST_RATE_LIMIT=100
APPLICATION_BURST_RATE_LIMIT=100
APPLICATION_RATE_LIMIT_TTL=1m
# Container addresses and ports for the Compose network.
# These ports are not published on the host.
POSTGRES_HOST=postgres
POSTGRES_PORT=5432
POSTGRES_USER=messenger
POSTGRES_PASSWORD=replace-with-local-postgres-password
POSTGRES_DATABASE=messenger
POSTGRES_VERSION_TABLE=versions
# Tern applies embedded migrations at API startup.
POSTGRES_RUN_MIGRATIONS=true
POSTGRES_MAX_CONNECTIONS=10
POSTGRES_CONNECT_TIMEOUT=500ms
POSTGRES_QUERY_TIMEOUT=2s
REDIS_HOST=redis
REDIS_PORT=6379
REDIS_USERNAME=default
REDIS_PASSWORD=replace-with-local-redis-password
REDIS_DB=0
SESSION_TTL_SECONDS=3600
JWT_ACCESS_TOKEN_LIFETIME=15m
# Legacy fallback used only when SESSION_TTL_SECONDS is empty.
JWT_REFRESH_TOKEN_LIFETIME=24h
# Container paths. Compose mounts ./certs read-only at /run/certs.
JWT_PUBLIC_KEY_PATH=/run/certs/public_key.pem
JWT_PRIVATE_KEY_PATH=/run/certs/private_key.pem
# Local HTTP defaults. Use secure cookies when serving through HTTPS.
COOKIES_ENABLED=false
COOKIES_DOMAIN=localhost
COOKIES_PATH=/
COOKIES_SECURE=false
COOKIES_SAME_SITE=lax
# Viper accepts a whitespace-separated list of origins.
COOKIES_ALLOWED_ORIGINS=http://localhost:8080