增加public服务,查询panel日志

This commit is contained in:
whyour
2022-02-24 23:50:04 +08:00
parent 531fc48bdf
commit ee52f09bcb
5 changed files with 56 additions and 4 deletions
+9 -4
View File
@@ -20,24 +20,29 @@ echo -e "======================3. 启动nginx========================\n"
nginx -s reload 2>/dev/null || nginx -c /etc/nginx/nginx.conf
echo -e "nginx启动成功...\n"
echo -e "======================4. 启动控制面板========================\n"
echo -e "======================4. 启动面板监控========================\n"
pm2 delete public &>/dev/null
pm2 start $dir_static/build/public.js -n public --source-map-support --time
echo -e "监控服务启动成功...\n"
echo -e "======================5. 启动控制面板========================\n"
pm2 delete panel &>/dev/null
pm2 start $dir_static/build/app.js -n panel --source-map-support --time
echo -e "控制面板启动成功...\n"
echo -e "======================5. 启动定时任务========================\n"
echo -e "======================6. 启动定时任务========================\n"
pm2 delete schedule &>/dev/null
pm2 start $dir_static/build/schedule.js -n schedule --source-map-support --time
echo -e "定时任务启动成功...\n"
if [[ $AutoStartBot == true ]]; then
echo -e "======================6. 启动bot========================\n"
echo -e "======================7. 启动bot========================\n"
nohup ql bot >>$dir_log/start.log 2>&1 &
echo -e "bot后台启动中...\n"
fi
if [[ $EnableExtraShell == true ]]; then
echo -e "======================7. 执行自定义脚本========================\n"
echo -e "======================8. 执行自定义脚本========================\n"
nohup ql extra >>$dir_log/start.log 2>&1 &
echo -e "自定义脚本后台执行中...\n"
fi
+11
View File
@@ -2,6 +2,10 @@ upstream api {
server 0.0.0.0:5600;
}
upstream public {
server 0.0.0.0:5400;
}
map $http_upgrade $connection_upgrade {
default keep-alive;
'websocket' upgrade;
@@ -12,6 +16,13 @@ server {
root /ql/static/dist;
ssl_session_timeout 5m;
location /api/public {
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass http://public;
}
location /api {
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;