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:
+19
@@ -59,19 +59,38 @@ services:
|
||||
ports:
|
||||
- "80:80"
|
||||
- "443:443"
|
||||
- "9000:9000" # Rustfs S3 API
|
||||
volumes:
|
||||
- ./nginx/conf.d:/etc/nginx/conf.d
|
||||
- ./nginx/certs:/etc/nginx/certs
|
||||
- ./frontend/build:/usr/share/nginx/html # Serve frontend
|
||||
- ./sabredav:/var/www/dav
|
||||
- rustfs_data:/data
|
||||
depends_on:
|
||||
- backend
|
||||
- sabredav
|
||||
networks:
|
||||
- appnet
|
||||
|
||||
rustfs:
|
||||
image: rustfs/rustfs:latest
|
||||
container_name: rustfs
|
||||
restart: always
|
||||
ports:
|
||||
- "9001:9000" # Web console
|
||||
environment:
|
||||
- RUSTFS_ADMIN_ACCESS_KEY=minioadmin
|
||||
- RUSTFS_ADMIN_SECRET_KEY=minioadmin
|
||||
volumes:
|
||||
- rustfs_data:/data
|
||||
networks:
|
||||
- appnet
|
||||
command: >
|
||||
bash -c "rustfs server /data --console-address :9000 --address :9000 --axum-server"
|
||||
|
||||
volumes:
|
||||
pgdata:
|
||||
rustfs_data:
|
||||
|
||||
|
||||
networks:
|
||||
|
||||
Reference in New Issue
Block a user