-
-
Save noman798/4e5f50be18a98bbe082856b4b1237c88 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# lebot | |
## 代码仓库 | |
# 项目代码 https://gitee.com/lebot/api | |
# 线上配置文件 https://gitee.com/lebot/config-online | |
## 部署流程 | |
GIT克隆项目。 | |
然后克隆配置文件, 并软链配置文件中的config.py到项目的sh/make/config/config.py 。 | |
检查config.py中的配置,并按需修改。 | |
然后运行 ./sh/install.sh ,初始化环境 | |
接着软链 /sh/supervisor/lebot.conf 到 /etc/supervisor/conf.d/ 目录下,运行sudo supervisorctl reload 来更新 supervisord 的配置。 | |
反向代理服务器用的是caddy | |
编辑 /etc/caddy/Caddyfile | |
添加 lebot 的 caddy | |
``` | |
import /home/u88/lebot/sh/Caddyfile | |
``` | |
重启caddy即可 | |
## 工程结构说明 | |
* dev.sh : 运行开发服务器 | |
* sh/make/make.py : 根据config.py生成各配置文件 | |
* src/route.coffee : 配置网址路由 | |
* src/url/mac.coffee : 绑定mac地址-内网ip | |
## 备份 | |
在crontab中添加如下内容,实现每日备份数据库。 | |
``` | |
LOG=/var/log/crontab | |
INIT_LEBOT=source ~/.bashrc;cd ~/lebot | |
1 1 * * * eval "$INIT_LEBOT";timeout 6h sh/backup/psql/data.sh >> $LOG/lebot.backup.log 2>&1 | |
``` | |
## 监控 | |
监控用的是阿里云监控 https://cloudmonitor.console.aliyun.com | |
监控报警联系人见 https://cloudmonitor.console.aliyun.com/#/contact/list/ | |
需要添加监控报警联系人,请微信zsp042,告知其手机、邮件、阿里旺旺(或钉钉) | |
紧急联系电话 张沈鹏 18513559923 | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment