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:
2026-02-17 22:47:38 +00:00
parent d43d7ebc5e
commit dfd552b02f
8 changed files with 304 additions and 0 deletions
+7
View File
@@ -43,6 +43,13 @@ docker compose up postgres -d > /dev/null 2>&1
log_success "PostgreSQL reset complete"
sleep 3
# --- 3b. Rustfs Reset (wipes data each run) ---
log_step "Resetting Rustfs (S3-compatible storage)..."
docker compose down -v rustfs > /dev/null 2>&1
docker compose up rustfs -d > /dev/null 2>&1
log_success "Rustfs reset complete"
sleep 2
# --- 4. Tmux Session Setup ---
if tmux has-session -t $SESSION_NAME 2>/dev/null; then
log_info "Killing existing tmux session..."