Harden login and refresh production deploy guide

This commit is contained in:
2026-05-17 05:52:09 +07:00
parent 9141f99f6a
commit 1274f2b822
5 changed files with 255 additions and 197 deletions

View File

@ -0,0 +1,26 @@
server {
listen 80;
listen [::]:80;
server_name abelbirdnest.id www.abelbirdnest.id;
client_max_body_size 20m;
location / {
proxy_pass http://127.0.0.1:3007;
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 http;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_read_timeout 120s;
}
location /api/v1/health {
proxy_pass http://127.0.0.1:3007;
proxy_http_version 1.1;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-Proto http;
}
}

View File

@ -4,10 +4,10 @@ After=network.target postgresql.service
[Service]
Type=simple
WorkingDirectory=/var/www/abelbirdnest-web
WorkingDirectory=/var/www/abelbirdnest-web/AbelBirdNest-Stock
Environment=NODE_ENV=production
Environment=PORT=3007
EnvironmentFile=/var/www/abelbirdnest-web/.env.production
EnvironmentFile=/var/www/abelbirdnest-web/AbelBirdNest-Stock/.env.production
ExecStart=/usr/bin/npm run start
Restart=always
RestartSec=5