Expose active rendered site on port 3000
This commit is contained in:
@@ -10,7 +10,7 @@ Group=website-engine
|
|||||||
WorkingDirectory=/opt/website-engine-control-plane
|
WorkingDirectory=/opt/website-engine-control-plane
|
||||||
Environment=NODE_ENV=production
|
Environment=NODE_ENV=production
|
||||||
Environment=HOST=127.0.0.1
|
Environment=HOST=127.0.0.1
|
||||||
Environment=PORT=3000
|
Environment=PORT=3001
|
||||||
Environment=LABYRICORN_BUILD_ROOT=/var/lib/website-engine/builds
|
Environment=LABYRICORN_BUILD_ROOT=/var/lib/website-engine/builds
|
||||||
ExecStart=/usr/bin/node /opt/website-engine-control-plane/dist/server.cjs
|
ExecStart=/usr/bin/node /opt/website-engine-control-plane/dist/server.cjs
|
||||||
Restart=on-failure
|
Restart=on-failure
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ server {
|
|||||||
server_name _;
|
server_name _;
|
||||||
|
|
||||||
location / {
|
location / {
|
||||||
proxy_pass http://127.0.0.1:3000;
|
proxy_pass http://127.0.0.1:3001;
|
||||||
proxy_http_version 1.1;
|
proxy_http_version 1.1;
|
||||||
proxy_set_header Host $host;
|
proxy_set_header Host $host;
|
||||||
proxy_set_header X-Real-IP $remote_addr;
|
proxy_set_header X-Real-IP $remote_addr;
|
||||||
@@ -12,3 +12,18 @@ server {
|
|||||||
proxy_set_header X-Forwarded-Proto $scheme;
|
proxy_set_header X-Forwarded-Proto $scheme;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
server {
|
||||||
|
listen 3000 default_server;
|
||||||
|
listen [::]:3000 default_server;
|
||||||
|
server_name _;
|
||||||
|
|
||||||
|
root /var/lib/website-engine/builds/current;
|
||||||
|
index index.html;
|
||||||
|
|
||||||
|
location / {
|
||||||
|
try_files $uri $uri/ =404;
|
||||||
|
|
||||||
|
error_page 404 /404.html;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user