ops: add deployment scripts and nginx/systemd configs
Scripts for installing and starting the app and nginx proxy. Includes systemd user service units and nginx configs for both user-mode 8443 and system-mode 443.
This commit is contained in:
89
deploy/nginx.local-kanban.conf
Normal file
89
deploy/nginx.local-kanban.conf
Normal file
@@ -0,0 +1,89 @@
|
||||
limit_req_zone $binary_remote_addr zone=kanban_login:10m rate=5r/m;
|
||||
|
||||
server {
|
||||
listen 443 ssl http2;
|
||||
server_name gahow-pc.ipads-lab.se.sjtu.edu.cn;
|
||||
root /var/www/local-kanban-portal;
|
||||
index index.html;
|
||||
|
||||
ssl_certificate /etc/nginx/certs/gahow-pc.fullchain.pem;
|
||||
ssl_certificate_key /etc/nginx/certs/gahow-pc.key;
|
||||
ssl_protocols TLSv1.2 TLSv1.3;
|
||||
ssl_prefer_server_ciphers off;
|
||||
|
||||
add_header Strict-Transport-Security "max-age=31536000" always;
|
||||
add_header X-Frame-Options "DENY" always;
|
||||
add_header X-Content-Type-Options "nosniff" always;
|
||||
add_header Referrer-Policy "no-referrer" always;
|
||||
|
||||
client_max_body_size 1m;
|
||||
|
||||
location / {
|
||||
try_files $uri $uri/ /index.html;
|
||||
}
|
||||
}
|
||||
|
||||
server {
|
||||
listen 3443 ssl http2;
|
||||
server_name gahow-pc.ipads-lab.se.sjtu.edu.cn;
|
||||
|
||||
ssl_certificate /etc/nginx/certs/gahow-pc.fullchain.pem;
|
||||
ssl_certificate_key /etc/nginx/certs/gahow-pc.key;
|
||||
ssl_protocols TLSv1.2 TLSv1.3;
|
||||
|
||||
location / {
|
||||
proxy_pass http://127.0.0.1:3300;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Host $host:3443;
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
server {
|
||||
listen 5443 ssl http2;
|
||||
server_name gahow-pc.ipads-lab.se.sjtu.edu.cn;
|
||||
|
||||
ssl_certificate /etc/nginx/certs/gahow-pc.fullchain.pem;
|
||||
ssl_certificate_key /etc/nginx/certs/gahow-pc.key;
|
||||
ssl_protocols TLSv1.2 TLSv1.3;
|
||||
|
||||
location /api/ {
|
||||
proxy_pass http://127.0.0.1:8787;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Host $host:5443;
|
||||
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;
|
||||
}
|
||||
|
||||
location / {
|
||||
proxy_pass http://127.0.0.1:5174;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Host $host:5443;
|
||||
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";
|
||||
}
|
||||
}
|
||||
|
||||
server {
|
||||
listen 8788 ssl http2;
|
||||
server_name gahow-pc.ipads-lab.se.sjtu.edu.cn;
|
||||
|
||||
ssl_certificate /etc/nginx/certs/gahow-pc.fullchain.pem;
|
||||
ssl_certificate_key /etc/nginx/certs/gahow-pc.key;
|
||||
ssl_protocols TLSv1.2 TLSv1.3;
|
||||
|
||||
location / {
|
||||
proxy_pass http://127.0.0.1:8787;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Host $host:8788;
|
||||
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;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user