Add deploy step.

This commit is contained in:
amass 2024-01-04 23:49:27 +08:00
parent 2aa3d667c6
commit 7a5d6916b7
2 changed files with 33 additions and 5 deletions

View File

@ -66,6 +66,10 @@ http {
server 127.0.0.1:8087; server 127.0.0.1:8087;
} }
upstream frp_jellyfin {
server 127.0.0.1:8096;
}
init_by_lua_file lua/settings.lua; init_by_lua_file lua/settings.lua;
server { server {
@ -202,6 +206,34 @@ http {
} }
} }
server {
listen 443 ssl;
server_name jellyfin.amass.fun;
client_header_timeout 120s;
client_body_timeout 120s;
client_max_body_size 512m;
ssl_certificate cert/jellyfin.amass.fun.pem;
ssl_certificate_key cert/jellyfin.amass.fun.key;
ssl_session_timeout 5m; #缓存有效期
ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:ECDHE:ECDH:AES:HIGH:!NULL:!aNULL:!MD5:!ADH:!RC4; #加密算法
ssl_protocols TLSv1 TLSv1.1 TLSv1.2; #安全链接可选的加密协议
ssl_prefer_server_ciphers on; #使用服务器端的首选算法
location / {
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header x-wiz-real-ip $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_pass http://frp_jellyfin;
}
}
server { server {
listen 443 ssl; listen 443 ssl;
server_name gitea.amass.fun; server_name gitea.amass.fun;

View File

@ -33,7 +33,7 @@ function build() {
build/UnitTest/UnitTest build/UnitTest/UnitTest
} }
function deploy_backend() { function deploy() {
build build
if [ $? -ne 0 ]; then if [ $? -ne 0 ]; then
echo "build backend failed ..." echo "build backend failed ..."
@ -46,10 +46,6 @@ function deploy_backend() {
nohup ./HttpServer >logs/HttpServer.log 2>&1 &" nohup ./HttpServer >logs/HttpServer.log 2>&1 &"
} }
function deploy() {
deploy_backend
}
function main() { function main() {
local cmd=$1 local cmd=$1
shift 1 shift 1