Commit 5dff158d authored by Junling Bu's avatar Junling Bu
Browse files

[deploy]: 调整

parent 32ea87b0
......@@ -20,7 +20,8 @@ fi
cd /home/ubuntu/deploy/litemall-db
cat litemall_schema.sql > db.sql
cat litemall.sql >> db.sql
cat litemall_table.sql > db.sql
cat litemall_data.sql >> db.sql
mysql -h localhost -u $ROOT -p$PASSWORD < db.sql
rm db.sql
......
......@@ -37,7 +37,8 @@ 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.sql ./deploy/litemall-db/litemall.sql
cp -f ./litemall-db/sql/litemall_table.sql ./deploy/litemall-db/litemall_table.sql
cp -f ./litemall-db/sql/litemall_data.sql ./deploy/litemall-db/litemall_data.sql
# 上传云主机
scp -i $ID_RSA -r ./deploy $REMOTE:/home/ubuntu/
这里的数据库由三个sql文件组成:
1. litemall_schema.sql
作用是创建空数据库、创建用户、设置访问权限。
开发者开发测试阶段可以使用,但是部署生产阶段一定要注意修改这里的默认用户名和密码。
2. litemall_table.sql
作用是创建数据库表,但是没有创建任何数据。
因此,开发者可以在部署生产阶段直接使用。
3. litemall_data.sql
作用是创建测试数据。
这里的测试数据来自开源项目[nideshop-mini-program](https://github.com/tumobi/nideshop-mini-program)
开发者开发测试阶段可以使用,但是部署开发阶段应该使用自己的数据。
\ 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