Add extensive debugging and more resilient startup
This commit is contained in:
		
							
								
								
									
										20
									
								
								start.sh
									
									
									
									
									
								
							
							
						
						
									
										20
									
								
								start.sh
									
									
									
									
									
								
							@@ -85,6 +85,7 @@ else
 | 
			
		||||
        S3_SECRET_KEY="$CLOUDRON_S3_SECRET"
 | 
			
		||||
        
 | 
			
		||||
        # Save for future runs
 | 
			
		||||
        mkdir -p /app/data
 | 
			
		||||
        cat > /app/data/s3_config.env << EOF
 | 
			
		||||
S3_ENDPOINT="$S3_ENDPOINT"
 | 
			
		||||
S3_REGION="$S3_REGION"
 | 
			
		||||
@@ -99,10 +100,19 @@ EOF
 | 
			
		||||
        echo "Region: $S3_REGION"
 | 
			
		||||
        echo "Bucket: $S3_BUCKET"
 | 
			
		||||
    else
 | 
			
		||||
        echo "==> ERROR: S3 configuration is required for Ente"
 | 
			
		||||
        echo "==> Please configure S3 storage in the Cloudron app settings"
 | 
			
		||||
        echo "==> or create /app/data/s3_config.env manually"
 | 
			
		||||
        exit 1
 | 
			
		||||
        echo "==> WARNING: S3 configuration is not found"
 | 
			
		||||
        echo "==> Creating a template S3 configuration for you to fill in"
 | 
			
		||||
        mkdir -p /app/data
 | 
			
		||||
        cat > /app/data/s3_config.env.template << EOF
 | 
			
		||||
# Rename this file to s3_config.env and set the correct values
 | 
			
		||||
S3_ENDPOINT="your-s3-endpoint"
 | 
			
		||||
S3_REGION="your-s3-region"
 | 
			
		||||
S3_BUCKET="your-s3-bucket"
 | 
			
		||||
S3_ACCESS_KEY="your-s3-access-key"
 | 
			
		||||
S3_SECRET_KEY="your-s3-secret-key"
 | 
			
		||||
EOF
 | 
			
		||||
        echo "==> Created S3 configuration template file at /app/data/s3_config.env.template"
 | 
			
		||||
        echo "==> Please fill in the values and rename it to s3_config.env"
 | 
			
		||||
    fi
 | 
			
		||||
fi
 | 
			
		||||
 | 
			
		||||
@@ -250,7 +260,7 @@ cat > /app/data/Caddyfile << 'EOF'
 | 
			
		||||
  admin off
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
:80 {
 | 
			
		||||
:3080 {
 | 
			
		||||
  # API endpoints - proxy to Museum server
 | 
			
		||||
  handle /api/* {
 | 
			
		||||
    uri strip_prefix /api
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user