Реализовать лабораторную 4 на оценку 5

Добавить приватное S3-хранилище, вложения, presigned upload, reconciler и доказательства.
This commit is contained in:
Чиняева
2026-11-07 01:37:21 +03:00
parent ec540a1a72
commit f39ae06ef3
69 changed files with 5254 additions and 31 deletions
+26 -9
View File
@@ -1,20 +1,37 @@
# Copy to .env for your LOCAL synthetic test environment; never commit .env.
# These are logical interface suggestions; map actual framework names in REPORT.md.
# Replace every change-me value. The repository contains no real secrets.
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
DATABASE_URL=postgresql://messenger:change-me-db-password@postgres:5432/messenger
POSTGRES_DB=messenger
POSTGRES_USER=messenger
POSTGRES_PASSWORD=change-me-db-password
CACHE_URL=redis://redis:6379/0
API_REPLICAS=2
API_PORT=8080
IDEMPOTENCY_TTL_SECONDS=86400
S3_ENDPOINT=http://s3:9000
# Private S3-compatible store (SeaweedFS 3.80).
S3_ENDPOINT=http://seaweedfs:8333
# Public endpoint used only to sign direct-upload URLs for clients.
S3_PUBLIC_ENDPOINT=http://localhost:9000
S3_PORT=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
# Restricted identity used by API replicas: Read/Write/List only.
S3_ACCESS_KEY_ID=change-me-app-access
S3_SECRET_ACCESS_KEY=change-me-app-secret
# Administrative identity used only by the one-shot s3-init service.
S3_ADMIN_ACCESS_KEY_ID=change-me-admin-access
S3_ADMIN_SECRET_ACCESS_KEY=change-me-admin-secret
MAX_UPLOAD_BYTES=10485760
MAX_IMAGE_PIXELS=40000000
MAX_DECODE_CONCURRENCY=1
PRESIGN_TTL_SECONDS=300
PRESIGN_GRACE_SECONDS=3600
ORPHAN_GRACE_SECONDS=86400
S3_CONNECT_TIMEOUT_SECONDS=3
S3_READ_TIMEOUT_SECONDS=30