Add S3/MinIO (RustFS) support and compose updates

Introduce S3-compatible storage support and update local/dev configuration.

- .claude: add "WebSearch" to local settings
- backend/.env.example: add USE_S3 flag and detailed S3/MinIO (RustFS) example env vars + comments to explain dev vs production usage
- backend/vontor_cz/settings.py: refactor to use USE_S3 boolean; set STATIC_ROOT; configure STORAGES for local filesystem vs S3 backends; add handling for S3 endpoint (MinIO/RustFS) vs real AWS S3 including path-style addressing, URL construction, and sensible AWS defaults
- docker-compose.yml: add rustfs to service dependencies, include rustfs in networks, change frontend port mapping to 8001:80, and add rustfs-data volume binding

These changes enable using a local S3-compatible backend (RustFS/MinIO) in development while keeping the option to swap to real AWS S3 for production.
This commit is contained in:
2026-06-10 01:29:30 +02:00
parent 2592a69790
commit 270d850572
4 changed files with 78 additions and 54 deletions

View File

@@ -12,6 +12,7 @@ services:
depends_on:
- db
- redis
- rustfs
volumes:
- ./backend:/app
- static-data:/app/collectedstaticfiles
@@ -66,6 +67,7 @@ services:
- redis
- db
- backend
- rustfs
networks:
- app_network
@@ -84,6 +86,7 @@ services:
- redis
- db
- backend
- rustfs
networks:
- app_network
@@ -114,8 +117,7 @@ services:
env_file:
- ./frontend/.env
ports:
- 80:80
# - 9000:80
- 8001:80
depends_on:
- backend
networks:
@@ -157,4 +159,10 @@ volumes:
type: none
o: bind
device: ./volumes/media
rustfs-data:
driver: local
driver_opts:
type: none
o: bind
device: ./volumes/rustfs