feat(storage): add S3/R2 abstraction with local Rustfs dev
- Add backend/internal/s3/ with build-tag pattern (dev vs prod) - Dev: Uses local Rustfs container (S3-compatible) - Prod: Stub for R2 Cloudflare (add AWS SDK to implement) - Add S3 env vars to .env.example and .env - Add Rustfs service to compose.yml - Add Rustfs reset to local-dev-2.sh (wipes data on each run)
This commit is contained in:
@@ -11,3 +11,19 @@ POSTGRES_HOST=postgres
|
||||
POSTGRES_PORT=5432
|
||||
|
||||
JWT_SECRET_KEY="a-very-secret-key-that-should-be-in-env"
|
||||
|
||||
# S3/R2 Configuration (for image storage)
|
||||
# Dev: Uses local Rustfs container (see compose.yml)
|
||||
# Prod: Use Cloudflare R2 credentials
|
||||
S3_ENDPOINT=http://localhost:9000
|
||||
S3_ACCESS_KEY=minioadmin
|
||||
S3_SECRET_KEY=minioadmin
|
||||
S3_BUCKET=crussell
|
||||
|
||||
# Prod: Uncomment and fill these for R2
|
||||
# R2_ENDPOINT=https://<account-id>.r2.cloudflarestorage.com
|
||||
# R2_ACCESS_KEY=<your-access-key>
|
||||
# R2_SECRET_KEY=<your-secret-key>
|
||||
# R2_BUCKET=crussell
|
||||
# R2_PUBLIC_URL=https://pub-<your-domain>.r2.dev
|
||||
# AWS_REGION=auto
|
||||
|
||||
Reference in New Issue
Block a user