forked from mtusi2026/mtusi2026lab4
Add two API replicas, safe object reconciliation, upload validation, regression tests and documented load experiments.
39 lines
1.6 KiB
Bash
39 lines
1.6 KiB
Bash
# 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
|
|
API_REPLICAS=2
|
|
IDEMPOTENCY_TTL_SECONDS=86400
|
|
S3_ENDPOINT=http://s3:9000
|
|
S3_REGION=us-east-1
|
|
S3_BUCKET=messenger-attachments
|
|
# Compose: root is used only by RustFS and the one-shot bootstrap.
|
|
S3_ROOT_ACCESS_KEY_ID=LABSTORAGE
|
|
S3_ROOT_SECRET_ACCESS_KEY=local_app_storage_password
|
|
S3_API_ACCESS_KEY_ID=LABAPI
|
|
S3_API_SECRET_ACCESS_KEY=local_api_storage_password
|
|
S3_RECONCILER_ACCESS_KEY_ID=LABRECONCILER
|
|
S3_RECONCILER_SECRET_ACCESS_KEY=local_reconciler_storage_password
|
|
# Running outside Compose: files must contain the selected restricted role's keys.
|
|
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
|
|
# Total time to receive an upload body, even if bytes continue arriving.
|
|
UPLOAD_BODY_TIMEOUT_MS=15000
|
|
S3_PUBLIC_PORT=9000
|
|
S3_PUBLIC_ENDPOINT=http://127.0.0.1:9000
|
|
DIRECT_UPLOAD_TTL_SECONDS=60
|
|
# Optional per-stage upload diagnostics; keep disabled outside experiments.
|
|
UPLOAD_MEMORY_PROFILE=0
|
|
# S3 orphan cleanup: grace period and pause between reconciliation passes.
|
|
ORPHAN_GRACE_SECONDS=600
|
|
RECONCILE_INTERVAL_SECONDS=60
|