docs: explain attachment lifecycle, research and reproducible setup

This commit is contained in:
2026-11-06 18:04:38 +03:00
parent ca9570f495
commit 6ac558ee08
6 changed files with 328 additions and 43 deletions
+19 -19
View File
@@ -1,20 +1,20 @@
# Copy to .env for your LOCAL synthetic test environment; never commit .env.
# These are logical interface suggestions; map actual framework names in REPORT.md.
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
# Copying is optional: make up runs scripts/bootstrap.py and creates .env once.
# Never put credentials in this file. Bootstrap writes ignored ./secrets/ files.
PUBLIC_PORT=8084
API_REPLICAS=2
IDEMPOTENCY_TTL_SECONDS=86400
S3_ENDPOINT=http://s3:9000
S3_REGION=us-east-1
S3_BUCKET=messenger-attachments
S3_ACCESS_KEY_ID_FILE=/run/secrets/s3_access_key_id
S3_SECRET_ACCESS_KEY_FILE=/run/secrets/s3_secret_access_key
MAX_UPLOAD_BYTES=10485760
MAX_IMAGE_PIXELS=40000000
API_CPUS=0.5
API_MEMORY=512m
POOL_MAX_SIZE=8
SESSION_TTL_SECONDS=3600
# Optional custom tag; default is mtusi-vasilev:lab4.
API_IMAGE=mtusi-vasilev:lab4
# Fixed internal topology in compose.yaml (comments, not .env overrides):
# API binds 0.0.0.0:8080; only LB publishes 127.0.0.1:${PUBLIC_PORT}:8080.
# PostgreSQL host=postgres, database/user=messenger; DATABASE_URL_FILE is mounted.
# CACHE_URL_FILE points to redis://cache:6379/0, public user cards only.
# S3_ENDPOINT=http://s3:8333, S3_BUCKET=messenger.
# S3_ACCESS_KEY_FILE=/run/secrets/s3_access_key
# S3_SECRET_KEY_FILE=/run/secrets/s3_secret_key
# Bootstrap alone receives S3_ADMIN_ACCESS_KEY_FILE/S3_ADMIN_SECRET_KEY_FILE.
# Storage backend/filer/master are on the isolated storage_backend network.