# bird **Repository Path**: amtech/bird ## Basic Information - **Project Name**: bird - **Description**: 货运后台系统,类似于货拉拉的后台 - **Primary Language**: Go - **License**: MIT - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 3 - **Created**: 2023-04-21 - **Last Updated**: 2023-04-21 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # Bird 部署说明 ## 1. 环境准备 - golang 1.16+ - 使用了//go:embed特性 - nginx - 加入systemctl,开机自启动 - 配置nginx反向代理规则 ```shell # 设置后台的路径 set $app_path /home/kangheng/workspace/bird/assets; location ^~/bird { proxy_pass http://127.0.0.1:9999; } location /bootstrap { root ${app_path}; } ``` - MySql 8.0 - 加入systemctl,开机自启动 - 连接地址,例如:127.0.0.1:3306 - Redis 1.5.4 - 连接地址,例如:127.0.0.1:6379 - 密码,可为空 - 连接DB,默认为0 ## 2. 设置代理 ```shell // 打开文件profile vim /etc/profile // 添加如下的环境变量 export GO111MODULE=on export GOPROXY=https://goproxy.io ``` ## 3. 其他说明配置 https://www.yuque.com/xinliangnote/go-gin-api/ngc3x5 ## 4. 编译 ```shell sh build.sh ``` ## 5. 运行 ```shell sh control.sh restart ``` ## 2. 申请相关的三方依赖 - https证书 (配合nginx部署) - 短信服务签名 (sdkappid、secretId、secretKey、signname等信息) ## 3. 代码编译部署 - 克隆git代码,并执行build.sh编译并部署 > 编译完成后会生成一个tar.gz包,将其解压至需要部署的位置即可 - 执行control.sh启动服务 > sh control.sh restart ## 4. 创建业务所需数据表 - 在配置的数据库执行附件中的sql以创建相关数据表