Initial import of AbelBirdNest Stock
This commit is contained in:
37
deploy/nginx/abelbirdnest.id.conf
Normal file
37
deploy/nginx/abelbirdnest.id.conf
Normal file
@ -0,0 +1,37 @@
|
||||
server {
|
||||
listen 80;
|
||||
listen [::]:80;
|
||||
server_name abelbirdnest.id www.abelbirdnest.id;
|
||||
|
||||
return 301 https://$host$request_uri;
|
||||
}
|
||||
|
||||
server {
|
||||
listen 443 ssl http2;
|
||||
listen [::]:443 ssl http2;
|
||||
server_name abelbirdnest.id www.abelbirdnest.id;
|
||||
|
||||
ssl_certificate /etc/letsencrypt/live/abelbirdnest.id/fullchain.pem;
|
||||
ssl_certificate_key /etc/letsencrypt/live/abelbirdnest.id/privkey.pem;
|
||||
|
||||
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 https;
|
||||
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 https;
|
||||
}
|
||||
}
|
||||
18
deploy/systemd/abelbirdnest-web.service
Normal file
18
deploy/systemd/abelbirdnest-web.service
Normal file
@ -0,0 +1,18 @@
|
||||
[Unit]
|
||||
Description=AbelBirdnest Stock Next.js
|
||||
After=network.target postgresql.service
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
WorkingDirectory=/var/www/abelbirdnest-web
|
||||
Environment=NODE_ENV=production
|
||||
Environment=PORT=3007
|
||||
EnvironmentFile=/var/www/abelbirdnest-web/.env.production
|
||||
ExecStart=/usr/bin/npm run start
|
||||
Restart=always
|
||||
RestartSec=5
|
||||
User=abelbirdnest
|
||||
Group=abelbirdnest
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
Reference in New Issue
Block a user