add systemd and nginx example configs

This commit is contained in:
2026-02-14 00:14:11 +00:00
parent 24e097c8b4
commit c6a7c009c6
2 changed files with 40 additions and 0 deletions

24
lmgcitfy.nginx.conf Normal file
View File

@ -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";
}
}

16
lmgcitfy.service Normal file
View File

@ -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