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
This commit is contained in:
Michael Joshua Saul
2026-02-25 21:13:02 -07:00
parent 3a02b43c0b
commit 0a2605706b
3 changed files with 50 additions and 12 deletions

View File

@@ -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!"

View File

@@ -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"
}
]

View File

@@ -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 <<EOF >/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 {