chore(app) transferred codebase from Lab2

This commit is contained in:
imadev
2026-10-26 19:40:35 +03:00
parent 0ab3a341aa
commit f731f9b460
45 changed files with 2653 additions and 13 deletions
+22 -8
View File
@@ -1,13 +1,27 @@
# Copy to .env for your LOCAL synthetic test environment; never commit .env.
# These are logical interface suggestions; map actual framework names in REPORT.md.
# compose.yaml reads these values. Only POSTGRES_PASSWORD is a secret.
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
API_REPLICAS=2
IDEMPOTENCY_TTL_SECONDS=86400
DB_POOL_MAX_CONNS=10
# Local PostgreSQL. The API receives a full DATABASE_URL built by compose.yaml.
POSTGRES_USER=messenger
POSTGRES_PASSWORD=replace-with-a-local-password
POSTGRES_DB=messenger
# Host port for the API. 8081 is used only by the optional short-TTL check.
APP_PORT_PUBLISH=8080
APP_SHORT_TTL_PORT=8081
# Redis is the session store (lab 2 grade 4); PostgreSQL stays the source of
# truth for users, chats, memberships and messages.
SESSION_STORE=redis
# Optional overrides instead of the compose-generated URLs. A *_FILE value is
# read from a file, which is how Docker/Compose secrets are usually mounted.
# DATABASE_URL=postgres://messenger:password@localhost:5432/messenger?sslmode=disable
# DATABASE_URL_FILE=/run/secrets/database_url
# CACHE_URL=redis://localhost:6379/0
# CACHE_URL_FILE=/run/secrets/cache_url