forked from mtusi2026/mtusi2026lab5
39 lines
1.6 KiB
Bash
39 lines
1.6 KiB
Bash
# scripts/bootstrap.sh creates ignored .env.lab5 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=18085
|
|
API_REPLICAS=2
|
|
API_CPUS=1
|
|
API_MEMORY=512m
|
|
POSTGRES_MAX_CONNECTIONS=8
|
|
APPLICATION_LOG_LEVEL=warn
|
|
SESSION_TTL_SECONDS=3600
|
|
API_IMAGE=mtusi-messenger:lab5
|
|
# 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.lab5.
|
|
S3_BUCKET=messenger-attachments
|
|
# 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.
|
|
|
|
# Planned lab5 async pipeline settings; the ported lab4 application does not use these yet.
|
|
BROKER_URL_FILE=/run/secrets/broker_url
|
|
WORKER_CONCURRENCY=2
|
|
JOB_MAX_ATTEMPTS=5
|
|
JOB_TIMEOUT_SECONDS=60
|
|
STAGING_RETENTION_SECONDS=86400
|