Реализовать лабораторную 2 на оценку 4
PostgreSQL как источник истины, непрозрачные сессии в Redis с TTL и AOF, миграции под advisory lock, пул и таймауты, проверки гонки/отката/отказов и отчёт с evidence.
This commit is contained in:
+20
-7
@@ -1,11 +1,24 @@
|
||||
# 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 for a LOCAL synthetic test environment; never commit .env.
|
||||
# These values are examples for an isolated stand, not real credentials.
|
||||
APP_HOST=0.0.0.0
|
||||
APP_PORT=8080
|
||||
API_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
|
||||
|
||||
POSTGRES_DB=messenger
|
||||
POSTGRES_USER=messenger
|
||||
# Replace this local-only value before starting the stand.
|
||||
POSTGRES_PASSWORD=change-me-local-synthetic-password
|
||||
DATABASE_URL=postgresql://messenger:change-me-local-synthetic-password@postgres:5432/messenger
|
||||
CACHE_URL=redis://redis:6379/0
|
||||
|
||||
# Bounded PostgreSQL pool and timeouts.
|
||||
DB_POOL_MIN=1
|
||||
DB_POOL_MAX=10
|
||||
DB_POOL_ACQUIRE_TIMEOUT_SECONDS=3
|
||||
DB_CONNECT_TIMEOUT_SECONDS=3
|
||||
DB_STATEMENT_TIMEOUT_MS=5000
|
||||
REDIS_CONNECT_TIMEOUT_SECONDS=2
|
||||
REDIS_SOCKET_TIMEOUT_SECONDS=2
|
||||
MAX_BODY_BYTES=1048576
|
||||
|
||||
Reference in New Issue
Block a user