From c6a7c009c6aeb6d8859b2292936387d6a0208e7b Mon Sep 17 00:00:00 2001 From: matty Date: Sat, 14 Feb 2026 00:14:11 +0000 Subject: [PATCH] add systemd and nginx example configs --- lmgcitfy.nginx.conf | 24 ++++++++++++++++++++++++ lmgcitfy.service | 16 ++++++++++++++++ 2 files changed, 40 insertions(+) create mode 100644 lmgcitfy.nginx.conf create mode 100644 lmgcitfy.service diff --git a/lmgcitfy.nginx.conf b/lmgcitfy.nginx.conf new file mode 100644 index 0000000..c7568a6 --- /dev/null +++ b/lmgcitfy.nginx.conf @@ -0,0 +1,24 @@ +server { + listen 80; + server_name example.com; + return 301 https://$host$request_uri; +} + +server { + listen 443 ssl; + server_name example.com; + + ssl_certificate /etc/letsencrypt/live/example.com/fullchain.pem; + ssl_certificate_key /etc/letsencrypt/live/example.com/privkey.pem; + + location / { + proxy_pass http://127.0.0.1:5000; + 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; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection "upgrade"; + } +} diff --git a/lmgcitfy.service b/lmgcitfy.service new file mode 100644 index 0000000..953a1f5 --- /dev/null +++ b/lmgcitfy.service @@ -0,0 +1,16 @@ +[Unit] +Description=LMGCITFY - Let Me GCI That For You +After=network.target + +[Service] +Type=simple +User=www-data +Group=www-data +WorkingDirectory=/opt/lmgcitfy +ExecStart=/usr/bin/npx next start -p 5000 +Restart=on-failure +RestartSec=5 +Environment=NODE_ENV=production + +[Install] +WantedBy=multi-user.target