Add production service and Nginx deployment
This commit is contained in:
@@ -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
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user