# Copy to .env for your LOCAL synthetic test environment; never commit .env. # These are the variable names actually read by src/core/config.py. APP_HOST=0.0.0.0 APP_PORT=8080 APP_ENV=lab SESSION_TTL_SECONDS=3600 # PostgreSQL. compose.yaml injects POSTGRES_HOST/REDIS_HOST for the api service. POSTGRES_USER=messenger POSTGRES_PASSWORD=change-me-local-only POSTGRES_DB=messenger POSTGRES_HOST=postgres POSTGRES_PORT=5432 # Redis session store (SESSION_STORE=redis is required for grade 4 in lab2). REDIS_HOST=redis REDIS_PORT=6379 REDIS_DB=0 SESSION_STORE=redis # --- Timeout budgets ------------------------------------------------------- # Every dependency call has a finite timeout; the request deadline is the last # line of defense, so a hung dependency returns 503 instead of hanging forever. # Worst dependency path (pool wait + connect + command) stays below the # request deadline, and the deadline stays below the 6 s observation budget. REQUEST_TIMEOUT_SECONDS=5 DB_CONNECT_TIMEOUT_SECONDS=2 DB_COMMAND_TIMEOUT_SECONDS=3 DB_POOL_TIMEOUT_SECONDS=2 REDIS_SOCKET_TIMEOUT_SECONDS=2 REDIS_SOCKET_CONNECT_TIMEOUT_SECONDS=2 HEALTH_CHECK_TIMEOUT_SECONDS=3