Реализация на 4

This commit is contained in:
Grbisba
2026-11-05 14:24:40 +03:00
parent 20f2f00a60
commit 8d44c74535
85 changed files with 3601 additions and 1109 deletions
+49 -9
View File
@@ -1,11 +1,51 @@
# Copy to .env for your LOCAL synthetic test environment; never commit .env.
# These are logical interface suggestions; map actual framework names in REPORT.md.
# Copy to .env and replace both password placeholders for a local synthetic stand.
# Never commit .env. Existing .env files must be updated manually; see infra/README.md.
HOST_PORT=8080
APP_ENABLED=true
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:
SESSION_STORE=postgres
CACHE_URL_FILE=/run/secrets/cache_url
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
# Compose fixes container addresses and ports to the service names below.
# 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
# The Go runner is not implemented; postgres bootstraps a new volume instead.
POSTGRES_RUN_MIGRATIONS=false
POSTGRES_MAX_CONNECTIONS=10
REDIS_HOST=redis
REDIS_PORT=6379
REDIS_USERNAME=default
REDIS_PASSWORD=replace-with-local-redis-password
REDIS_DB=0
JWT_ACCESS_TOKEN_LIFETIME=15m
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