Add production service and Nginx deployment

This commit is contained in:
2026-07-23 13:45:20 -07:00
parent c95f3c034a
commit 170540e118
3 changed files with 40 additions and 0 deletions
+23
View File
@@ -0,0 +1,23 @@
[Unit]
Description=Labyricorn Website Engine Control Plane
After=network-online.target
Wants=network-online.target
[Service]
Type=simple
User=website-engine
Group=website-engine
WorkingDirectory=/opt/website-engine-control-plane
Environment=NODE_ENV=production
Environment=LABYRICORN_BUILD_ROOT=/var/lib/website-engine/builds
ExecStart=/usr/bin/node /opt/website-engine-control-plane/dist/server.cjs
Restart=on-failure
RestartSec=5s
NoNewPrivileges=true
PrivateTmp=true
ProtectSystem=strict
ProtectHome=true
ReadWritePaths=/var/lib/website-engine
[Install]
WantedBy=multi-user.target
@@ -0,0 +1,3 @@
[Service]
IPAddressDeny=any
IPAddressAllow=localhost
+14
View File
@@ -0,0 +1,14 @@
server {
listen 80 default_server;
listen [::]:80 default_server;
server_name _;
location / {
proxy_pass http://127.0.0.1:3000;
proxy_http_version 1.1;
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;
}
}