Hardcode Wasabi S3 configuration with proper Ente format

- Remove dynamic S3 configuration loading
- Hardcode Wasabi credentials as requested
- Use proper Ente S3 configuration format with datacenter names
- Configure all three storage buckets (b2-eu-cen, wasabi-eu-central-2-v3, scw-eu-fr-v3)
- Set are_local_buckets to false for external S3
- Add compliance flag for Wasabi bucket

This should fix the MissingRegion error by properly configuring S3 storage
according to Ente's expected format.

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

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Your Name
2025-07-21 20:41:58 -06:00
parent fc82e988e9
commit e3eb1b0491

View File

@@ -78,52 +78,22 @@ fi
# =============================================== # ===============================================
log "INFO" "Setting up configuration" log "INFO" "Setting up configuration"
# S3 configuration # S3 configuration - Hardcoded for Wasabi
S3_CONFIG="/app/data/s3.env" log "INFO" "Setting up hardcoded Wasabi S3 configuration"
if [ ! -f "$S3_CONFIG" ]; then
log "INFO" "Creating default S3 configuration file"
cat > "$S3_CONFIG" << EOF
# Ente S3 Storage Configuration
# Edit these values with your S3-compatible storage credentials
# Required settings # Hardcoded Wasabi credentials
S3_ACCESS_KEY=your-access-key S3_ACCESS_KEY="QZ5M3VMBUHDTIFDFCD8E"
S3_SECRET_KEY=your-secret-key S3_SECRET_KEY="pz1eHYjU1NwAbbruedc7swzCuszd57p1rGSFVzjv"
S3_ENDPOINT=your-s3-endpoint # e.g., s3.amazonaws.com S3_ENDPOINT="https://s3.eu-central-2.wasabisys.com"
S3_REGION=your-region # e.g., us-east-1 S3_REGION="eu-central-2"
S3_BUCKET=your-bucket-name S3_BUCKET="ente-due-ren"
# Optional settings log "INFO" "Using Wasabi S3 configuration:"
# S3_PREFIX=ente/ # Optional prefix for all objects log "INFO" " Endpoint: ${S3_ENDPOINT}"
# S3_PUBLIC_URL= # Optional public URL for the bucket (if different from endpoint) log "INFO" " Region: ${S3_REGION}"
EOF log "INFO" " Bucket: ${S3_BUCKET}"
chmod 600 "$S3_CONFIG"
log "INFO" "Created S3 config template at ${S3_CONFIG}"
log "WARN" "⚠️ YOU MUST EDIT /app/data/s3.env WITH YOUR ACTUAL S3 CREDENTIALS ⚠️"
else
log "INFO" "S3 configuration file already exists"
fi
# Load S3 configuration # S3 configuration is now hardcoded above
if [ -f "$S3_CONFIG" ]; then
source "$S3_CONFIG"
log "INFO" "Loaded S3 configuration"
# Validate S3 configuration
if [ -z "$S3_ENDPOINT" ]; then
log "ERROR" "S3_ENDPOINT is not set. S3 storage will not work."
fi
if [ -z "$S3_ACCESS_KEY" ]; then
log "ERROR" "S3_ACCESS_KEY is not set. S3 storage will not work."
fi
if [ -z "$S3_SECRET_KEY" ]; then
log "ERROR" "S3_SECRET_KEY is not set. S3 storage will not work."
fi
if [ -z "$S3_BUCKET" ]; then
log "ERROR" "S3_BUCKET is not set. S3 storage will not work."
fi
else
log "WARN" "S3 configuration file not found at $S3_CONFIG. S3 storage may not be configured."
fi
# Museum server configuration # Museum server configuration
MUSEUM_CONFIG="/app/data/ente/server/museum.yaml" MUSEUM_CONFIG="/app/data/ente/server/museum.yaml"
@@ -149,14 +119,31 @@ cors:
allow_origins: allow_origins:
- "*" - "*"
# S3 storage configuration # S3 storage configuration following Ente's format
s3: s3:
endpoint: "${S3_ENDPOINT:-s3.amazonaws.com}" are_local_buckets: false
region: "${S3_REGION:-us-east-1}" use_path_style_urls: false
access_key: "${S3_ACCESS_KEY}" # Hot storage bucket (primary)
secret_key: "${S3_SECRET_KEY}" b2-eu-cen:
bucket: "${S3_BUCKET}" key: "${S3_ACCESS_KEY}"
public_url: "https://${CLOUDRON_APP_FQDN}/photos" secret: "${S3_SECRET_KEY}"
endpoint: "${S3_ENDPOINT}"
region: "${S3_REGION}"
bucket: "${S3_BUCKET}"
# Replication buckets (using same bucket for simplicity)
wasabi-eu-central-2-v3:
key: "${S3_ACCESS_KEY}"
secret: "${S3_SECRET_KEY}"
endpoint: "${S3_ENDPOINT}"
region: "${S3_REGION}"
bucket: "${S3_BUCKET}"
compliance: true
scw-eu-fr-v3:
key: "${S3_ACCESS_KEY}"
secret: "${S3_SECRET_KEY}"
endpoint: "${S3_ENDPOINT}"
region: "${S3_REGION}"
bucket: "${S3_BUCKET}"
# Email settings # Email settings
email: email: