Skip to content

Commit

Permalink
Merge pull request #51 from bigbaser/dev-2.2.0
Browse files Browse the repository at this point in the history
Dev 2.2.0
  • Loading branch information
vissssa authored Oct 22, 2019
2 parents 1db9130 + fee5941 commit 495aa91
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 3 deletions.
2 changes: 1 addition & 1 deletion deploy/docs/Docker部署.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ $ sudo docker-compose ps
![](http://tcloud-static.oss-cn-beijing.aliyuncs.com/tcloud_git/kong-1.png)

成功后,进入SNAPSHOT页面,点击IMPORT FROM FILE,选择我们的`kong.json`文件,并进入DETAILS中RESTORE,全选导入,可能会出错,再执行一次即可,此时我们的网关服务已经运行完成,地址为`http://localhost:9000`
ps: 数据库初始化文件是init/init.sql,可以通过`sudo docker-compose down -v``sudo docker-compose up -d`来重新初始化数据库
ps: 数据库初始化文件是init/init.sql,可以通过`sudo docker-compose down -v`再删除`volume/mysql`挂载目录之后,`sudo docker-compose up -d`来重新初始化数据库


### 3、部署前端
Expand Down
17 changes: 17 additions & 0 deletions deploy/docs/云真机部署.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
1.搭建STF服务 此服务不再赘述,[参考文档](https://www.cnblogs.com/hanxiaobei/p/9772553.html)

2.搭建好后,接入安卓设备

3.打开STF前端页面,本地部署的话 地址是localhost:7100点击设置选择按键点击+号,新增accesstoken

3.将stf服务地址配置进数据库demo库内config表module=stf的3个参数修改为{"URL":"http://192.168.25.22:7100/api/v1/devices,headers:{Authorization:" "Bearer 4bce26f231fe4ffea92ac2818380d81596476fd3cf8840439c2d11df3cce1be3"}}
url 是stf本地部署的服务地址,Authorization 是 Bearer+accesstoken(Bearer与accesstoken 之间有空格)

5.修改前端项目Tcloud/config/prod.env.js:新增参数STF_URL:'"http://192.168.25.22:7100"'

6.重新部署前端项目在Tcloud目录下执行npm run dev

7.重新打开/刷新前端项目,云真机搭建完成


需要图文教程移步https://testerhome.com/topics/20960
2 changes: 1 addition & 1 deletion deploy/local_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
SERVER_ENV = 'dev'

# SQL 连接字符串
SQLALCHEMY_DATABASE_URI = 'mysql://username:[email protected]:3306/tcloud?charset=utf8'
SQLALCHEMY_DATABASE_URI = 'mysql://root:tc123456@mysql:3306/demo?charset=utf8'

# 密钥相关
SECRET = '####'
Expand Down
2 changes: 1 addition & 1 deletion local_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
SERVER_ENV = 'dev'

# SQL 连接字符串
SQLALCHEMY_DATABASE_URI = 'mysql://root:tc123456@mysql:3306/demo?charset=utf8'
SQLALCHEMY_DATABASE_URI = 'mysql://<username>:<password>@<host>:<port>/<db>?charset=utf8'

# 密钥相关
SECRET = '####'
Expand Down

0 comments on commit 495aa91

Please sign in to comment.