feat: integrate MinIO storage for image caching service

- Replace file system storage with MinIO object storage
- Add MinIO cache implementation with 3-level directory structure
- Support dynamic switching between MinIO and filesystem via config
- Fix metadata encoding issue for non-ASCII URLs
- Successfully tested with various image sources including Korean URLs

All image service features working:
- Image proxy and download
- 5 size variants (thumb, card, list, detail, hero)
- WebP format conversion
- Cache hit/miss detection
- Background size generation

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
jungwoo choi
2025-09-12 07:46:12 +09:00
parent 005088189f
commit 8866a90f65
4 changed files with 432 additions and 4 deletions

View File

@ -6,11 +6,19 @@ class Settings(BaseSettings):
app_name: str = "Image Proxy Service"
debug: bool = True
# 캐시 설정
# 캐시 설정 (MinIO 전환 시에도 로컬 임시 파일용)
cache_dir: Path = Path("/app/cache")
max_cache_size_gb: int = 10
cache_ttl_days: int = 30
# MinIO 설정
use_minio: bool = True # MinIO 사용 여부
minio_endpoint: str = "minio:9000"
minio_access_key: str = "minioadmin"
minio_secret_key: str = "minioadmin"
minio_bucket_name: str = "image-cache"
minio_secure: bool = False
# 이미지 설정
max_image_size_mb: int = 20
allowed_formats: list = ["jpg", "jpeg", "png", "gif", "webp", "svg"]