diff --git a/start.sh b/start.sh index fb09f8a..d6f3ecc 100644 --- a/start.sh +++ b/start.sh @@ -78,52 +78,22 @@ fi # =============================================== log "INFO" "Setting up configuration" -# S3 configuration -S3_CONFIG="/app/data/s3.env" -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 +# S3 configuration - Hardcoded for Wasabi +log "INFO" "Setting up hardcoded Wasabi S3 configuration" -# Required settings -S3_ACCESS_KEY=your-access-key -S3_SECRET_KEY=your-secret-key -S3_ENDPOINT=your-s3-endpoint # e.g., s3.amazonaws.com -S3_REGION=your-region # e.g., us-east-1 -S3_BUCKET=your-bucket-name +# Hardcoded Wasabi credentials +S3_ACCESS_KEY="QZ5M3VMBUHDTIFDFCD8E" +S3_SECRET_KEY="pz1eHYjU1NwAbbruedc7swzCuszd57p1rGSFVzjv" +S3_ENDPOINT="https://s3.eu-central-2.wasabisys.com" +S3_REGION="eu-central-2" +S3_BUCKET="ente-due-ren" -# Optional settings -# S3_PREFIX=ente/ # Optional prefix for all objects -# S3_PUBLIC_URL= # Optional public URL for the bucket (if different from endpoint) -EOF - 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 +log "INFO" "Using Wasabi S3 configuration:" +log "INFO" " Endpoint: ${S3_ENDPOINT}" +log "INFO" " Region: ${S3_REGION}" +log "INFO" " Bucket: ${S3_BUCKET}" -# Load S3 configuration -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 +# S3 configuration is now hardcoded above # Museum server configuration MUSEUM_CONFIG="/app/data/ente/server/museum.yaml" @@ -149,14 +119,31 @@ cors: allow_origins: - "*" -# S3 storage configuration +# S3 storage configuration following Ente's format s3: - endpoint: "${S3_ENDPOINT:-s3.amazonaws.com}" - region: "${S3_REGION:-us-east-1}" - access_key: "${S3_ACCESS_KEY}" - secret_key: "${S3_SECRET_KEY}" - bucket: "${S3_BUCKET}" - public_url: "https://${CLOUDRON_APP_FQDN}/photos" + are_local_buckets: false + use_path_style_urls: false + # Hot storage bucket (primary) + b2-eu-cen: + key: "${S3_ACCESS_KEY}" + 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: