diff --git a/deploy/labyricorn-control-plane.service b/deploy/labyricorn-control-plane.service new file mode 100644 index 0000000..5486932 --- /dev/null +++ b/deploy/labyricorn-control-plane.service @@ -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 diff --git a/deploy/labyricorn-control-plane.service.d-network.conf b/deploy/labyricorn-control-plane.service.d-network.conf new file mode 100644 index 0000000..16b23a9 --- /dev/null +++ b/deploy/labyricorn-control-plane.service.d-network.conf @@ -0,0 +1,3 @@ +[Service] +IPAddressDeny=any +IPAddressAllow=localhost diff --git a/deploy/nginx-website-engine.conf b/deploy/nginx-website-engine.conf new file mode 100644 index 0000000..1010e99 --- /dev/null +++ b/deploy/nginx-website-engine.conf @@ -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; + } +}