调整脚本
This commit is contained in:
parent
6bba2bc8b1
commit
01f7abb572
File diff suppressed because one or more lines are too long
|
|
@ -24,6 +24,7 @@ http {
|
|||
#tcp_nopush on;
|
||||
|
||||
keepalive_timeout 65;
|
||||
client_max_body_size 2000m;
|
||||
|
||||
#gzip on;
|
||||
|
||||
|
|
@ -32,7 +33,11 @@ http {
|
|||
server {
|
||||
listen 4000;
|
||||
location / {
|
||||
proxy_pass http://forgeplus:5000;
|
||||
proxy_set_header Host $http_host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header REMOTE-HOST $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_pass http://forgeplus:4000;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
11
setup.sh
11
setup.sh
|
|
@ -4,7 +4,7 @@ echo "开始检查安装文件..."
|
|||
# 定义应用名称
|
||||
app_name="gitlink"
|
||||
|
||||
# 定义要搜索的字符串
|
||||
# 定义要搜索的字符串,初始不用改
|
||||
search_string="172.20.32.202"
|
||||
|
||||
# 定义要替换的新字符串
|
||||
|
|
@ -16,11 +16,11 @@ if [ ! -d "02-forgeplus/forgeplus" ]; then
|
|||
echo "代码目录路径不存在:02-forgeplus/forgeplus"
|
||||
# exit 1
|
||||
echo "正在克隆代码到:02-forgeplus/forgeplus"
|
||||
git clone -b dev_local_v1 https://gitlink.org.cn/Trustie/forgeplus.git 02-forgeplus/forgeplus
|
||||
git clone -b dev_local_v1 --depth 1 https://gitlink.org.cn/Trustie/forgeplus.git 02-forgeplus/forgeplus
|
||||
sleep 2
|
||||
rm -rf 02-forgeplus/forgeplus/public/react/build
|
||||
echo "正在克隆代码到:02-forgeplus/forgeplus/public/react/build"
|
||||
git clone -b dev_local_v1 https://gitlink.org.cn/gitlink/build.git 02-forgeplus/forgeplus/public/react/build
|
||||
git clone -b dev_local_v1 --depth 1 https://gitlink.org.cn/gitlink/build.git 02-forgeplus/forgeplus/public/react/build
|
||||
fi
|
||||
|
||||
echo "检查代码库运行文件是否存在..."
|
||||
|
|
@ -76,14 +76,15 @@ sed -i "s/$search_string/$replace_string/g" /data/$app_name/packages/02-forgeplu
|
|||
echo "搜索并替换完成"
|
||||
|
||||
echo "导入镜像"
|
||||
find /data/$app_name/packages/06-images/ -type f -name "*.tar" | xargs -I {} docker load -i {}
|
||||
# find /data/$app_name/packages/06-images/ -type f -name "*.tar" | xargs -I {} docker load -i {}
|
||||
# ls /data/$app_name/packages/06-images/*.tar | xargs -I {} docker load -i {}
|
||||
|
||||
echo "启动服务..."
|
||||
# 启动服务
|
||||
docker-compose -f docker-compose.yml up -d
|
||||
|
||||
sleep 3
|
||||
docker exec -it forgeplus bin/rails db:migrate
|
||||
# docker exec -it forgeplus bin/rails db:migrate
|
||||
echo "启动开源项目服务完成。"
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue