- 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)
30 lines
894 B
Bash
30 lines
894 B
Bash
# Database Credentials for all services
|
|
|
|
# These are used by the 'postgres' service to initialize the database
|
|
# These are used by 'backend' (Go) and 'sabredav' (PHP)
|
|
POSTGRES_USER=myuser
|
|
POSTGRES_PASSWORD=mypassword
|
|
POSTGRES_DB=mydb
|
|
|
|
# and to connect to the 'postgres' service on the Docker network
|
|
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
|