From 5c76451474ef699eb2a10b90fcf007cf49a36304 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20D=C3=BCren?= Date: Sun, 16 Mar 2025 23:33:59 +0100 Subject: [PATCH] Fix NGINX read-only filesystem and database connection issues --- start.sh | 47 ++++++++++++++++++++++++++++++++++++++++------- 1 file changed, 40 insertions(+), 7 deletions(-) diff --git a/start.sh b/start.sh index 84d7f72..5d3ada8 100644 --- a/start.sh +++ b/start.sh @@ -445,12 +445,27 @@ else echo "==> Port $API_PORT is available for API server" fi +# Create necessary NGINX temp directories +mkdir -p /app/data/nginx/client_body_temp +mkdir -p /app/data/nginx/proxy_temp +mkdir -p /app/data/nginx/fastcgi_temp +mkdir -p /app/data/nginx/uwsgi_temp +mkdir -p /app/data/nginx/scgi_temp +mkdir -p /app/data/logs/nginx + # Create the NGINX config cat > /app/data/nginx/nginx.conf < Created NGINX config at /app/data/nginx/nginx.conf" # Start NGINX -echo "==> Starting NGINX on port $NGINX_PORT" nginx -c /app/data/nginx/nginx.conf -p /app/data/nginx & NGINX_PID=$! echo "==> NGINX started with PID $NGINX_PID" @@ -686,7 +700,7 @@ if [ -d "$SERVER_DIR/cmd/museum" ]; then # Execute as the cloudron user but use a proper script instead of env cd cat > /tmp/run_migration.sh < /tmp/run_server.sh < /app/data/logs/museum.log 2>&1 & SERVER_PID=$!