From eab30de08826441eb144e6d1c0ae0f7709d4fd56 Mon Sep 17 00:00:00 2001 From: Andreas Dueren Date: Mon, 14 Jul 2025 21:23:09 -0600 Subject: [PATCH] Fix filesystem readonly issues and pnpm path --- nginx.conf | 7 +++++++ start.sh | 6 +++++- supervisord.conf | 2 +- 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/nginx.conf b/nginx.conf index 421297e..022f68c 100644 --- a/nginx.conf +++ b/nginx.conf @@ -6,6 +6,13 @@ server { index index.html; client_max_body_size 100m; + + # Create temporary directories in writable locations + client_body_temp_path /tmp/nginx_client_temp; + proxy_temp_path /tmp/nginx_proxy_temp; + fastcgi_temp_path /tmp/nginx_fastcgi_temp; + uwsgi_temp_path /tmp/nginx_uwsgi_temp; + scgi_temp_path /tmp/nginx_scgi_temp; # Enable compression gzip on; diff --git a/start.sh b/start.sh index f5a310c..8814c30 100644 --- a/start.sh +++ b/start.sh @@ -58,7 +58,11 @@ export JWT_TOKEN_EXPIRES_IN="30d" echo "=> Running database migrations" cd /app/code chown -R cloudron:cloudron /app/data -sudo -u cloudron pnpm prisma migrate deploy || true +sudo -u cloudron /usr/bin/node /app/code/node_modules/.bin/prisma migrate deploy || true + +# Create nginx temp directories +mkdir -p /tmp/nginx_client_temp /tmp/nginx_proxy_temp /tmp/nginx_fastcgi_temp /tmp/nginx_uwsgi_temp /tmp/nginx_scgi_temp +chown -R cloudron:cloudron /tmp/nginx_* echo "=> Starting services with supervisor" exec /usr/bin/supervisord -c /etc/supervisor/conf.d/supervisord.conf \ No newline at end of file diff --git a/supervisord.conf b/supervisord.conf index 4af922f..cba2759 100644 --- a/supervisord.conf +++ b/supervisord.conf @@ -15,7 +15,7 @@ autorestart=true priority=100 [program:docmost] -command=/usr/bin/sudo -u cloudron /usr/bin/pnpm start:server +command=/usr/local/bin/gosu cloudron:cloudron /usr/bin/node /app/code/apps/server/dist/main.js directory=/app/code stdout_logfile=/dev/stdout stdout_logfile_maxbytes=0