forked from mtusi2026/mtusi2026lab2
Add PostgreSQL storage and Valkey sessions for lab2.
Messages survive restart in Postgres, and bearer sessions persist in Valkey with AOF. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
+7
-3
@@ -4,8 +4,12 @@ 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.
|
||||
# Sessions of this stand live in Valkey, not in PostgreSQL.
|
||||
SESSION_STORE=valkey
|
||||
POSTGRES_USER=messenger
|
||||
POSTGRES_PASSWORD=local-only-change-me
|
||||
POSTGRES_DB=messenger
|
||||
# Optional file paths. The API reads a file when it exists, otherwise DATABASE_URL / REDIS_URL.
|
||||
# Compose injects those URLs itself; do not put the database password into Git beyond this placeholder.
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user