修改部署脚本和配置,部署到0.16服务器上

This commit is contained in:
weiweiw 2025-01-24 16:29:29 +08:00
parent 141673020d
commit 658c554c8c
10 changed files with 52 additions and 20 deletions

View File

@ -21,11 +21,11 @@ spring:
password: nacos
discovery:
# 服务注册地址
server-addr: 127.0.0.1:18848
server-addr: 192.168.0.16:18848
namespace: bonus-ai
config:
# 配置中心地址
server-addr: 127.0.0.1:18848
server-addr: 192.168.0.16:18848
namespace: bonus-ai
# 配置文件格式
file-extension: yml

View File

@ -16,11 +16,11 @@ spring:
password: nacos
discovery:
# 服务注册地址
server-addr: 127.0.0.1:18848
server-addr: 192.168.0.16:18848
namespace: bonus-ai
config:
# 配置中心地址
server-addr: 127.0.0.1:18848
server-addr: 192.168.0.16:18848
namespace: bonus-ai
# 配置文件格式
file-extension: yml

View File

@ -26,11 +26,11 @@ for source_jar in "${app_source_jars[@]}"; do
new_filename="${base_name}${suffix}.jar"
echo "filename:$new_filename"
scp -P 22 -r ${app_workspace}/${source_jar} "root@192.168.0.16:$deploy_path/$new_filename"
scp "root@192.168.0.56:"${app_workspace}/${source_jar} "$deploy_path/$new_filename"
echo "copied ${app_workspace}/${source_jar} to '$deploy_path/$new_filename'"
done
scp -P 22 -r ${ai_workspace}/"bonus-modules/bonus-ai/target/bonus-modules-ai-v2.jar" root@192.168.0.16:$deploy_path
scp "root@192.168.0.56:"${ai_workspace}/"bonus-modules/bonus-ai/target/bonus-modules-ai-v2.jar" $deploy_path
echo "copied ${app_workspace}/${source_jar} to $deploy_path"
# Define an array of JAR files to run

View File

@ -16,11 +16,11 @@ spring:
password: nacos
discovery:
# 服务注册地址
server-addr: 127.0.0.1:18848
server-addr: 192.168.0.16:18848
namespace: bonus-ai
config:
# 配置中心地址
server-addr: 127.0.0.1:18848
server-addr: 192.168.0.16:18848
namespace: bonus-ai
# 配置文件格式
file-extension: yml

View File

@ -17,11 +17,11 @@ spring:
password: nacos
discovery:
# 服务注册地址
server-addr: 127.0.0.1:18848
server-addr: 192.168.0.16:18848
namespace: bonus-ai
config:
# 配置中心地址
server-addr: 127.0.0.1:18848
server-addr: 192.168.0.16:18848
namespace: bonus-ai
# 配置文件格式
file-extension: yml

View File

@ -16,11 +16,11 @@ spring:
password: nacos
discovery:
# 服务注册地址
server-addr: 127.0.0.1:18848
server-addr: 192.168.0.16:18848
namespace: bonus-ai
config:
# 配置中心地址
server-addr: 127.0.0.1:18848
server-addr: 192.168.0.16:18848
namespace: bonus-ai
# 配置文件格式
file-extension: yml

View File

@ -16,11 +16,11 @@ spring:
password: nacos
discovery:
# 服务注册地址
server-addr: 127.0.0.1:18848
server-addr: 192.168.0.16:18848
namespace: bonus-ai
config:
# 配置中心地址
server-addr: 127.0.0.1:18848
server-addr: 192.168.0.16:18848
namespace: bonus-ai
# 配置文件格式
file-extension: yml

32
scripts/stopServices.sh Executable file
View File

@ -0,0 +1,32 @@
#!/bin/bash
# Define an array of JAR files to run
jars=("bonus-auth-ai-v2.jar --spring.config.location=file:auth_bootstrap.yml"
"bonus-gateway-ai-v2.jar --spring.config.location=file:gateway_bootstrap.yml"
"bonus-system-ai-v2.jar --spring.config.location=file:system_bootstrap.yml"
"bonus-file-ai-V2.jar --spring.config.location=file:file_bootstrap.yml")
# 遍历数组并检查每个JAR文件的进程
for jar_with_args in "${jars[@]}"; do
# 提取JAR文件名不包括参数
jar=$(echo $jar_with_args | awk '{print $1}')
# 检查进程是否启动
echo "原应用程序1 $jar "
pids=$(pgrep -f $jar || true)
echo "原应用程序2 $jar "
if [ -n "$pids" ]; then
echo "$jar is running with PID(s): $pids"
# 杀死进程
for pid in $pids; do
kill -9 $pid
if [ $? -eq 0 ]; then
echo "Process $pid for $jar killed successfully"
else
echo "Failed to kill process $pid for $jar"
fi
done
else
echo "$jar is not running"
fi
done

View File

@ -16,11 +16,11 @@ spring:
password: nacos
discovery:
# 服务注册地址
server-addr: 127.0.0.1:18848
server-addr: 192.168.0.16:18848
namespace: bonus-ai
config:
# 配置中心地址
server-addr: 127.0.0.1:18848
server-addr: 192.168.0.16:18848
namespace: bonus-ai
# 配置文件格式
file-extension: yml

View File

@ -16,12 +16,12 @@ spring:
password: nacos
discovery:
# 服务注册地址
server-addr: 192.168.0.56:8848
namespace: 39c95294-eb64-4096-ada1-30a215bdd511
server-addr: 192.168.0.16:18848
namespace: bonus-ai
config:
# 配置中心地址
server-addr: 192.168.0.56:8848
namespace: 39c95294-eb64-4096-ada1-30a215bdd511
server-addr: 192.168.0.16:18848
namespace: bonus-ai
# 配置文件格式
file-extension: yml
# 共享配置