forked from mtusi2026/mtusi2026lab4
Реализация на 5
This commit is contained in:
+27
-16
@@ -1,20 +1,31 @@
|
||||
# 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
|
||||
# scripts/bootstrap.sh creates ignored .env.lab4 with random synthetic credentials.
|
||||
# This example documents actual Compose inputs; it contains no live secrets.
|
||||
POSTGRES_PASSWORD=replace-with-local-postgres-password
|
||||
REDIS_PASSWORD=replace-with-local-redis-password
|
||||
HOST_PORT=18081
|
||||
API_REPLICAS=2
|
||||
IDEMPOTENCY_TTL_SECONDS=86400
|
||||
S3_ENDPOINT=http://s3:9000
|
||||
S3_REGION=us-east-1
|
||||
API_CPUS=1
|
||||
API_MEMORY=512m
|
||||
POSTGRES_MAX_CONNECTIONS=8
|
||||
APPLICATION_LOG_LEVEL=warn
|
||||
SESSION_TTL_SECONDS=3600
|
||||
API_IMAGE=mtusi-messenger:lab4
|
||||
# Session TTL defaults to 3600; use >=300 for smoke/persistence.
|
||||
# Message idempotency retention is fixed at 24 hours; API never runs migrations.
|
||||
|
||||
# S3 credentials are generated locally by scripts/bootstrap-storage.py.
|
||||
# For a custom bucket, also export S3_BUCKET before make up: the credential
|
||||
# bootstrap reads the process environment, while Compose reads .env.lab4.
|
||||
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
|
||||
# Runtime values fixed in compose.yaml (not configurable through this file):
|
||||
# S3_ENDPOINT=http://s3:9000
|
||||
# S3_REGION=us-east-1
|
||||
# S3_ACCESS_KEY_ID_FILE=/run/secrets/s3_access
|
||||
# S3_SECRET_ACCESS_KEY_FILE=/run/secrets/s3_secret
|
||||
MAX_UPLOAD_BYTES=10485760
|
||||
MAX_IMAGE_PIXELS=40000000
|
||||
# Bounded attachment request lifetime; grace must exceed twice this duration.
|
||||
UPLOAD_TIMEOUT=120s
|
||||
RECONCILE_GRACE_PERIOD=1h
|
||||
# SeaweedFS image and persistent bucket bootstrap are pinned in compose.yaml.
|
||||
# API has four upload slots and one decoder per replica, GOMEMLIMIT=384MiB.
|
||||
|
||||
Reference in New Issue
Block a user