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:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user