diff --git a/backend/services/.env.example b/backend/services/.env.example index 1c00a961..8daaf536 100644 --- a/backend/services/.env.example +++ b/backend/services/.env.example @@ -99,3 +99,21 @@ MPC_ACCOUNT_SERVICE_URL=http://192.168.1.111:4000 # MPC JWT Secret - MUST match mpc-system's JWT_SECRET_KEY # SECURITY: Generate with: openssl rand -base64 48 MPC_JWT_SECRET=change_this_jwt_secret_key_to_random_value_min_32_chars + +# ============================================================================= +# MinIO Object Storage (Server A: 192.168.1.100) +# ============================================================================= +# MinIO S3 API endpoint (internal LAN access) +MINIO_ENDPOINT=192.168.1.100 +MINIO_PORT=9000 +MINIO_USE_SSL=false + +# MinIO credentials (must match minio server config) +MINIO_ACCESS_KEY=admin +MINIO_SECRET_KEY=minio_secret_password + +# Bucket for user avatars +MINIO_BUCKET_AVATARS=avatars + +# Public URL for accessing files (CDN with caching) +MINIO_PUBLIC_URL=https://cdn.szaiai.com diff --git a/backend/services/docker-compose.yml b/backend/services/docker-compose.yml index 40c75a51..1c407348 100644 --- a/backend/services/docker-compose.yml +++ b/backend/services/docker-compose.yml @@ -124,6 +124,14 @@ services: - BACKUP_SERVICE_URL=http://backup-service:3002 - BACKUP_SERVICE_ENABLED=true - SERVICE_JWT_SECRET=${SERVICE_JWT_SECRET} + # MinIO Object Storage (Server A: 192.168.1.100) + - MINIO_ENDPOINT=${MINIO_ENDPOINT:-192.168.1.100} + - MINIO_PORT=${MINIO_PORT:-9000} + - MINIO_USE_SSL=${MINIO_USE_SSL:-false} + - MINIO_ACCESS_KEY=${MINIO_ACCESS_KEY:-admin} + - MINIO_SECRET_KEY=${MINIO_SECRET_KEY:-minio_secret_password} + - MINIO_BUCKET_AVATARS=${MINIO_BUCKET_AVATARS:-avatars} + - MINIO_PUBLIC_URL=${MINIO_PUBLIC_URL:-https://cdn.szaiai.com} depends_on: postgres: condition: service_healthy diff --git a/backend/services/identity-service/.env.example b/backend/services/identity-service/.env.example index 3b015e69..3d3e4c43 100644 --- a/backend/services/identity-service/.env.example +++ b/backend/services/identity-service/.env.example @@ -107,20 +107,22 @@ KAVA_RPC_URL="https://evm.kava.io" BSC_RPC_URL="https://bsc-dataseed.binance.org" # ============================================================================= -# MinIO Object Storage Configuration +# MinIO Object Storage Configuration (Server A: 192.168.1.100) # ============================================================================= -# MinIO endpoint (internal Docker: http://rwa-minio:9000) -MINIO_ENDPOINT="localhost" +# MinIO S3 API endpoint +# - LAN access: 192.168.1.100:9000 +# - Domain: minio.szaiai.com (for external access) +MINIO_ENDPOINT="192.168.1.100" MINIO_PORT=9000 MINIO_USE_SSL=false -# MinIO credentials (must match minio docker-compose config) +# MinIO credentials (must match minio server config) MINIO_ACCESS_KEY="admin" MINIO_SECRET_KEY="minio_secret_password" # Bucket for user avatars MINIO_BUCKET_AVATARS="avatars" -# Public URL for accessing files (via Nginx or direct) -# For production, use CDN URL: https://cdn.szaiai.com -MINIO_PUBLIC_URL="http://localhost:9000" +# Public URL for accessing files (CDN with caching) +# Users access files via CDN: https://cdn.szaiai.com/avatars/{userId}/{uuid}.jpg +MINIO_PUBLIC_URL="https://cdn.szaiai.com"