MinIO community images can no longer be pulled on this arm64 host, so the stand runs RustFS 1.0.4 pinned by digest as non-root with a read only root, no published port, the console off and data on the s3data volume. A one-off s3-init with rc v0.1.36 creates the bucket, keeps it private for anonymous clients, creates the API user with a policy on the objects and listing of that one bucket, imports a lifecycle rule for incomplete multipart uploads and checks itself; the API replicas start only after it succeeded. Root keys reach only s3, s3-init and the operator s3-cli; the API gets its own key and the S3 settings through an anchor merged into its environment. secrets.sh creates hex S3 keys, the restart hook restarts S3 next to PostgreSQL and Valkey and waits until it is healthy, the limits policy covers the S3 services, and the stack evidence lists the new packages. The object storage adapter is tested against a throwaway RustFS of the same image: a 10 MiB round trip, a missing object, an idempotent delete and an unreachable endpoint failing within the request budget. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
45 lines
1.6 KiB
Bash
45 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
|
|
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
|
|
# Solution-specific: published LB ports, replica limits, workers and pool per replica,
|
|
# LB queue per replica, drain window before closing the listener on SIGTERM, PostgreSQL
|
|
# limits, load generator limits (profile bench), cursor key file. API_PORT/SHORTTTL_PORT of lab2 are gone:
|
|
# only the load balancer is published.
|
|
LB_HTTP_PORT=8080
|
|
LB_STATS_PORT=8404
|
|
API_CPUS=1
|
|
API_MEMORY=512m
|
|
WEB_CONCURRENCY=2
|
|
DB_POOL_MAX_SIZE=8
|
|
API_SERVER_MAXCONN=64
|
|
DRAIN_SECONDS=2
|
|
PG_MAX_CONNECTIONS=200
|
|
PG_CPUS=2
|
|
PG_MEMORY=1g
|
|
K6_CPUS=2
|
|
K6_MEMORY=512m
|
|
CURSOR_SECRET_FILE=/run/secrets/cursor_secret
|
|
# Solution-specific for lab4: S3 client timeouts (connect + read, two attempts stay below
|
|
# REQUEST_TIMEOUT_SECONDS=8), parallel image checks per worker, RustFS memory limit.
|
|
S3_CONNECT_TIMEOUT_SECONDS=1
|
|
S3_READ_TIMEOUT_SECONDS=2
|
|
IMAGE_CHECK_CONCURRENCY=2
|
|
S3_MEMORY=512m
|