parent
13c1e2b349
commit
abe1f54aab
@ -1,21 +0,0 @@
|
|||||||
module.exports = {
|
|
||||||
apps: [
|
|
||||||
{
|
|
||||||
name: "backend",
|
|
||||||
script: "npm",
|
|
||||||
args: "run start",
|
|
||||||
cwd: "./backend",
|
|
||||||
instances: 1,
|
|
||||||
exec_mode: "fork",
|
|
||||||
autorestart: true,
|
|
||||||
watch: false,
|
|
||||||
max_memory_restart: "500M",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "nginx",
|
|
||||||
script: "nginx",
|
|
||||||
args: "-g 'daemon off;'",
|
|
||||||
exec_interpreter: "none",
|
|
||||||
},
|
|
||||||
],
|
|
||||||
};
|
|
@ -1,36 +0,0 @@
|
|||||||
events {}
|
|
||||||
http {
|
|
||||||
server {
|
|
||||||
listen 80;
|
|
||||||
|
|
||||||
location /api {
|
|
||||||
proxy_set_header X-Real-RIP $remote_addr;
|
|
||||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
||||||
|
|
||||||
proxy_set_header Host $http_host;
|
|
||||||
proxy_set_header X-NginX-Proxy true;
|
|
||||||
|
|
||||||
proxy_pass http://localhost:4000; # for backend
|
|
||||||
proxy_redirect off;
|
|
||||||
|
|
||||||
# proxy_cookie_path / "/; secure; HttpOnly; SameSite=strict";
|
|
||||||
proxy_cookie_path / "/; HttpOnly; SameSite=strict";
|
|
||||||
}
|
|
||||||
|
|
||||||
location / {
|
|
||||||
include /etc/nginx/mime.types;
|
|
||||||
|
|
||||||
proxy_set_header X-Real-RIP $remote_addr;
|
|
||||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
||||||
|
|
||||||
proxy_set_header Host $http_host;
|
|
||||||
proxy_set_header X-NginX-Proxy true;
|
|
||||||
|
|
||||||
proxy_set_header Upgrade $http_upgrade;
|
|
||||||
proxy_set_header Connection "upgrade";
|
|
||||||
|
|
||||||
proxy_pass http://localhost:3000; # for frontend
|
|
||||||
proxy_redirect off;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
Loading…
Reference in new issue