mirror of
https://github.com/Memo-2023/mana-monorepo.git
synced 2026-05-22 09:06:42 +02:00
feat(storage): unified single-bucket architecture with Hetzner S3
- Refactor @manacore/shared-storage to use single `manacore-storage` bucket
- Add generateStorageKey() for path structure: {userId}/{appName}/...
- Update docker-compose.dev.yml for unified MinIO bucket
- Migrate CD workflow to use GitHub Environment Secrets
- Update picture and contacts backends to use unified storage
- Remove per-app bucket configuration (cleaner architecture)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
d268e8e463
commit
78cd59a77a
10 changed files with 225 additions and 251 deletions
|
|
@ -36,6 +36,9 @@ S3_REGION=us-east-1
|
|||
S3_ACCESS_KEY=minioadmin
|
||||
S3_SECRET_KEY=minioadmin
|
||||
|
||||
# Unified Storage (single bucket for all apps)
|
||||
MANACORE_STORAGE_PUBLIC_URL=http://localhost:9000/manacore-storage
|
||||
|
||||
# ============================================
|
||||
# MANA-CORE-AUTH SERVICE
|
||||
# ============================================
|
||||
|
|
@ -127,9 +130,7 @@ PICTURE_DATABASE_URL=postgresql://manacore:devpassword@localhost:5432/picture
|
|||
# Replicate API Token for AI image generation
|
||||
PICTURE_REPLICATE_API_TOKEN=r8_QlvkstNhIc6NBX1ktpQ6ibvzOE2d2UQ1Emamd
|
||||
|
||||
# Storage Configuration (uses MinIO locally, Hetzner in production)
|
||||
# Uses shared S3_* variables from above - no project-specific override needed for local dev
|
||||
PICTURE_STORAGE_PUBLIC_URL=http://localhost:9000/picture-storage
|
||||
# Storage: Uses unified manacore-storage bucket (see MANACORE_STORAGE_PUBLIC_URL above)
|
||||
|
||||
# Credit System (staging only - freemium: 3 free images, then credits)
|
||||
PICTURE_APP_ID=picture-app
|
||||
|
|
@ -148,8 +149,7 @@ NUTRIPHI_DATABASE_URL=postgresql://nutriphi:nutriphi_dev_password@localhost:5435
|
|||
NUTRIPHI_APP_ID=nutriphi
|
||||
NUTRIPHI_GEMINI_API_KEY=your-gemini-api-key-here
|
||||
|
||||
# S3 Storage (uses MinIO locally via shared S3_* variables, Hetzner in production)
|
||||
NUTRIPHI_S3_PUBLIC_URL=http://localhost:9000/nutriphi-storage
|
||||
# Storage: Uses unified manacore-storage bucket
|
||||
|
||||
# ============================================
|
||||
# ZITARE PROJECT
|
||||
|
|
@ -180,9 +180,7 @@ VOXEL_LAVA_API_URL=http://localhost:3010
|
|||
CONTACTS_BACKEND_PORT=3015
|
||||
CONTACTS_DATABASE_URL=postgresql://manacore:devpassword@localhost:5432/contacts
|
||||
|
||||
# S3 Storage for contact photos
|
||||
CONTACTS_S3_BUCKET=contacts-photos
|
||||
CONTACTS_S3_PUBLIC_URL=http://localhost:9000/contacts-photos
|
||||
# Storage: Uses unified manacore-storage bucket
|
||||
|
||||
# Google OAuth for contacts import
|
||||
# Get credentials from https://console.cloud.google.com/apis/credentials
|
||||
|
|
@ -204,7 +202,6 @@ CALENDAR_DATABASE_URL=postgresql://manacore:devpassword@localhost:5432/calendar
|
|||
|
||||
STORAGE_BACKEND_PORT=3016
|
||||
STORAGE_DATABASE_URL=postgresql://manacore:devpassword@localhost:5432/storage
|
||||
STORAGE_S3_PUBLIC_URL=http://localhost:9000/storage-storage
|
||||
STORAGE_MAX_FILE_SIZE=104857600
|
||||
STORAGE_MAX_FILES_PER_UPLOAD=10
|
||||
|
||||
|
|
@ -265,7 +262,6 @@ FINANCE_DATABASE_URL=postgresql://manacore:devpassword@localhost:5432/finance
|
|||
|
||||
INVENTORY_BACKEND_PORT=3020
|
||||
INVENTORY_DATABASE_URL=postgresql://manacore:devpassword@localhost:5432/inventory
|
||||
INVENTORY_S3_PUBLIC_URL=http://localhost:9000/inventory-storage
|
||||
|
||||
# ============================================
|
||||
# TECHBASE PROJECT
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue