Commit 6ba6d107 authored by Junling Bu's avatar Junling Bu
Browse files

fix[deploy]:upload.sh脚本设置了错误的litemall-db路径。

parent 22ff0f92
...@@ -20,8 +20,8 @@ cp -f ./litemall-admin-api/target/litemall-admin-api-*.jar ./deploy/litemall-ad ...@@ -20,8 +20,8 @@ cp -f ./litemall-admin-api/target/litemall-admin-api-*.jar ./deploy/litemall-ad
tar -zcvf ./deploy/litemall-admin/dist.tar -C ./litemall-admin/dist . tar -zcvf ./deploy/litemall-admin/dist.tar -C ./litemall-admin/dist .
# 复制数据库 # 复制数据库
cp -f ./litemall-db/sql/litemall_schema.sql ./deploy/litemall_db/litemall_schema.sql cp -f ./litemall-db/sql/litemall_schema.sql ./deploy/litemall-db/litemall_schema.sql
cp -f ./litemall-db/sql/litemall.sql ./deploy/litemall_db/litemall.sql cp -f ./litemall-db/sql/litemall.sql ./deploy/litemall-db/litemall.sql
# 上传云主机 # 上传云主机
scp -i $ID_RSA -r ./deploy ubuntu@$CVM:/home/ubuntu/ scp -i $ID_RSA -r ./deploy ubuntu@$CVM:/home/ubuntu/
...@@ -501,9 +501,15 @@ https://docs.spring.io/spring-boot/docs/1.5.10.RELEASE/reference/htmlsingle/#dep ...@@ -501,9 +501,15 @@ https://docs.spring.io/spring-boot/docs/1.5.10.RELEASE/reference/htmlsingle/#dep
7. 自动上传脚本 7. 自动上传脚本
为了简化步骤1和步骤2,完成了util/upload.sh脚本,用户需要设置相应的云主机IP和密钥文件路径。 为了简化步骤1和步骤2,完成了deploy/util/upload.sh脚本,用户需要设置相应的云主机IP和密钥文件路径。
该脚本会自动把当前项目不同模块下的最终部署文件复制到deploy文件夹中,然后上传到云主机。 该脚本会自动把当前项目不同模块下的最终部署文件复制到deploy文件夹中,然后上传到云主机。
注意: 注意:
> 上传脚本没有自动做Spring Boot项目打包和Vue项目打包工作 > 上传脚本没有自动做Spring Boot项目打包和Vue项目打包工作
> 因此运行该脚本前请确认最终部署文件已经生成。 > 因此运行该脚本前请确认最终部署文件已经生成。
> 如果用户觉得需要,可以自行在upload.sh脚本中添加相应的编译打包命令。 > 如果用户觉得需要,可以自行在upload.sh脚本中添加相应的编译打包命令。
\ No newline at end of file
如下图所示,上传脚本自动上传deploy文件夹到云主机:
![](pic1/1-7.png)
需要指出的是,这里的upload.sh脚本是private文件夹中的文件,因为private文件夹是
在.gitignore中设置忽略,因此upload.sh脚本里面可以包含一些隐私信息,
如云主机IP和当前系统私钥文件地址,而其他内容则和deploy/util/upload.sh完全一致。
\ No newline at end of file
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment