From 0a2605706b9eb1163e464a17384f0c92113455f8 Mon Sep 17 00:00:00 2001 From: Michael Joshua Saul Date: Wed, 25 Feb 2026 21:13:02 -0700 Subject: [PATCH] fix: plane space SSR, static path, live server config, update script - Add plane-space systemd service for SSR (react-router-serve on port 3002) - Fix nginx /spaces/ to proxy to plane-space instead of static files - Fix nginx /static/ alias to correct Django collectstatic path - Fix plane-live EnvironmentFile to /opt/plane/.env - Fix plane-live ExecStart to use start.mjs - Update script: backup/restore all .env files, include plane-space - Update script: add configure_instance after migrations - Split JSON notes for god-mode and credentials --- ct/plane.sh | 21 ++++++++++++++------ frontend/public/json/plane.json | 6 +++++- install/plane-install.sh | 35 ++++++++++++++++++++++++++++----- 3 files changed, 50 insertions(+), 12 deletions(-) diff --git a/ct/plane.sh b/ct/plane.sh index bda39e9f..3be1ce6c 100644 --- a/ct/plane.sh +++ b/ct/plane.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -source <(curl -fsSL https://raw.githubusercontent.com/onionrings29/ProxmoxVE/feat/add-plane/misc/build.func) +source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func) # Copyright (c) 2021-2026 community-scripts ORG # Author: onionrings29 # License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE @@ -31,11 +31,15 @@ function update_script() { if check_for_gh_release "plane" "makeplane/plane"; then msg_info "Stopping Services" - systemctl stop plane-api plane-worker plane-beat plane-live + systemctl stop plane-api plane-worker plane-beat plane-live plane-space msg_ok "Stopped Services" msg_info "Backing up Data" - cp /opt/plane/apps/api/.env /opt/plane-env.bak + cp /opt/plane/apps/api/.env /opt/plane-api-env.bak + cp /opt/plane/.env /opt/plane-live-env.bak + cp /opt/plane/apps/web/.env /opt/plane-web-env.bak + cp /opt/plane/apps/admin/.env /opt/plane-admin-env.bak + cp /opt/plane/apps/space/.env /opt/plane-space-env.bak msg_ok "Backed up Data" msg_info "Downloading Update" @@ -53,8 +57,12 @@ function update_script() { msg_ok "Downloaded Update" msg_info "Restoring Config" - cp /opt/plane-env.bak /opt/plane/apps/api/.env - rm /opt/plane-env.bak + cp /opt/plane-api-env.bak /opt/plane/apps/api/.env + cp /opt/plane-live-env.bak /opt/plane/.env + cp /opt/plane-web-env.bak /opt/plane/apps/web/.env + cp /opt/plane-admin-env.bak /opt/plane/apps/admin/.env + cp /opt/plane-space-env.bak /opt/plane/apps/space/.env + rm -f /opt/plane-api-env.bak /opt/plane-live-env.bak /opt/plane-web-env.bak /opt/plane-admin-env.bak /opt/plane-space-env.bak msg_ok "Restored Config" msg_info "Rebuilding Frontend (Patience)" @@ -78,12 +86,13 @@ function update_script() { set +a $STD /opt/plane-venv/bin/python manage.py migrate $STD /opt/plane-venv/bin/python manage.py collectstatic --noinput + $STD /opt/plane-venv/bin/python manage.py configure_instance msg_ok "Ran Migrations" echo "${RELEASE}" >/opt/plane_version.txt msg_info "Starting Services" - systemctl start plane-api plane-worker plane-beat plane-live + systemctl start plane-api plane-worker plane-beat plane-live plane-space msg_ok "Started Services" msg_ok "Updated successfully!" diff --git a/frontend/public/json/plane.json b/frontend/public/json/plane.json index c76ba00a..c0c0f05f 100644 --- a/frontend/public/json/plane.json +++ b/frontend/public/json/plane.json @@ -37,7 +37,11 @@ "type": "info" }, { - "text": "Configuration file is at: `/opt/plane/apps/api/.env`. Credentials are saved to `~/plane.creds`.", + "text": "Admin panel (God Mode) is available at `/god-mode/` for instance configuration.", + "type": "info" + }, + { + "text": "Credentials are saved to `~/plane.creds`.", "type": "info" } ] diff --git a/install/plane-install.sh b/install/plane-install.sh index da9ded7a..ca78834a 100644 --- a/install/plane-install.sh +++ b/install/plane-install.sh @@ -262,11 +262,28 @@ After=network.target [Service] Type=simple WorkingDirectory=/opt/plane -EnvironmentFile=/opt/plane/apps/api/.env +EnvironmentFile=/opt/plane/.env ExecStart=/usr/bin/node apps/live/dist/start.mjs Restart=on-failure RestartSec=5 -Environment=PORT=3100 + +[Install] +WantedBy=multi-user.target +EOF + +cat </etc/systemd/system/plane-space.service +[Unit] +Description=Plane Space Server +After=network.target + +[Service] +Type=simple +WorkingDirectory=/opt/plane/apps/space +Environment=PORT=3002 +Environment=NODE_ENV=production +ExecStart=/opt/plane/apps/space/node_modules/.bin/react-router-serve ./build/server/index.js +Restart=on-failure +RestartSec=5 [Install] WantedBy=multi-user.target @@ -276,6 +293,7 @@ systemctl enable -q --now plane-api systemctl enable -q --now plane-worker systemctl enable -q --now plane-beat systemctl enable -q --now plane-live +systemctl enable -q --now plane-space msg_ok "Created Services" msg_info "Configuring Nginx" @@ -288,6 +306,10 @@ upstream plane-live { server 127.0.0.1:3100; } +upstream plane-space { + server 127.0.0.1:3002; +} + upstream plane-minio { server 127.0.0.1:9000; } @@ -314,7 +336,7 @@ server { } location /static/ { - alias /opt/plane/apps/api/static/; + alias /opt/plane/apps/api/plane/static-assets/collected-static/; } location /live/ { @@ -336,8 +358,11 @@ server { } location /spaces/ { - alias /opt/plane/apps/space/build/client/; - try_files $uri $uri/ /spaces/index.html; + proxy_pass http://plane-space; + proxy_set_header Host $host; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header X-Forwarded-Proto $scheme; } location /spaces {