ЛР 3: балансировка, 2 реплики API и общая идемпотентность (оценка 3)
This commit is contained in:
+14
-6
@@ -1,13 +1,21 @@
|
||||
# Copy to .env for your LOCAL synthetic test environment; never commit .env.
|
||||
# These are logical interface suggestions; map actual framework names in REPORT.md.
|
||||
# Values below are placeholders, not secrets. Choose your own local values.
|
||||
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
|
||||
|
||||
# Shared PostgreSQL for BOTH API replicas
|
||||
POSTGRES_USER=messenger
|
||||
POSTGRES_PASSWORD=replace-with-local-synthetic-password
|
||||
POSTGRES_DB=messenger
|
||||
DATABASE_URL=postgresql://messenger:replace-with-local-synthetic-password@db:5432/messenger
|
||||
|
||||
# Alternative for deployments that mount a secret file instead of an env variable:
|
||||
# DATABASE_URL_FILE=/run/secrets/database_url
|
||||
|
||||
# Lab3 topology
|
||||
API_REPLICAS=2
|
||||
IDEMPOTENCY_TTL_SECONDS=86400
|
||||
# Redis/Valkey is not used on level 3; sessions and the idempotency ledger are in PostgreSQL.
|
||||
# SESSION_STORE=postgres
|
||||
|
||||
Reference in New Issue
Block a user