Giter Club home page Giter Club logo

zhenxun_bot-deploy's Introduction

zhenxun_bot-deploy

真寻 bot 一键部署脚本

食用方法

bash <(curl -s -L https://raw.githubusercontent.com/zhenxun-org/zhenxun_bot-deploy/master/install.sh)

更新

2023/04/09

  • 修复tortoise更新出现的问题 #33

2023/01/26

  • 使用虚拟环境运行
  • 删除github action
  • 删除draw_card资源下载
  • 添加自定义工作目录

2022/06/15

  • 修复运行psql时的权限问题 #21

2022/05/21

  • 修复 bug #15

2022/05/20

  • 更改监听端口为 14514
  • 添加卸载二次验证 #12

2022/05/18 [v1.0.4]

  • 添加切换 git 源功能
  • 添加卸载功能
  • 显示安装时长
  • 修改 pip 源使用方式
  • 修改安装目录为/home

zhenxun_bot-deploy's People

Contributors

akademeia avatar akashicoin avatar github-actions[bot] avatar sakuracio avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

zhenxun_bot-deploy's Issues

一键脚本启动出现的问题

bot.py似乎是启动成功了,但是好像缺少了很多的包,configs文件夹下也没有生成config.yml文件,python版本是3.8.3,linux的版本是centos8,这是日志的截图
QUHBHL{)87$FRCPTETKY5GD
image

出bug了

在某迅机制启动阻拦登录的时候,或者登录不成功,会卡死在失效的二维码界面。重新输入脚本之后会显示已安装但是未启动。机器人配置文件什么也没有,但是反向代理的还在。

脚本选项6. 修改 zhenxun_bot 配置文件点开后是cqhttp的配置文件

bug?:
脚本选项6. 修改 zhenxun_bot 配置文件点开后是cqhttp的配置文件

使用感想:
脚本傻瓜易容 还没奇怪的问题非常适合我这种复制粘贴选手,就是这默认插件全开 要挨个在qq用口令关闭有点难顶。

P站排行口令机器人永远是回复“网络不太好?没有该页数?也许过一会就好了...” 也不知道是不是个人问题还是插件问题。

要是有更多种类的bot一键部署脚本就更好了(小声

关于一键安装脚本的一些建议

首先非常感谢提供一键安装脚本,懒人福音

建议:
1.升级问题,真寻bot可能因为接口更新存在升级 目前我看是加入了脚本升级,没有真寻升级
2.安装问题,可以考虑解决第一点。安装脚本会安装环境,但检测安装是通过home目录下的文件是否有真寻。移掉文件后安装,环境还需要重新安装。能否基于这点,以安装的文件移到备份目录,重新下载新版本的真寻。这样环境不用重新安装只需要下载新版本的真寻即可

进程守护

  • 疑问与建议:如何让服务进程在重启后自动运行呢?建议为一键脚本加上进程守护功能

  • 当选择非内置Go-Cqhttp和Postgres时可否可选安装与卸载?目前体验内置版go-cqhttp命令都无响应,自建的正常

  • WEBUI目前无法使用,没有返回任何数据

数据库连接问题

user: str = "" # 数据用户名
password: str = "" # 数据库密码
address: str = "" # 数据库地址
port: str = "" # 数据库端口
database: str = "" # 数据库名称

这些默认填的是什么,我看了一下我这些都是空的

试了好多次都是这个结果

02-27 02:34:09 [SUCCESS] nonebot | Running NoneBot...
02-27 02:34:09 [INFO] uvicorn | Started server process [22926]
02-27 02:34:09 [INFO] uvicorn | Waiting for application startup.
02-27 02:34:10 [INFO] services | Database loaded successfully!
02-27 02:34:10 [INFO] nonebot_plugin_apscheduler | Scheduler Started
02-27 02:34:11 [ERROR] uvicorn | Traceback (most recent call last):
File "/root/.cache/pypoetry/virtualenvs/zhenxun-bot-UH4sDRIh-py3.9/lib/python3.9/site-packages/starlette/routing.py", line 671, in lifespan
async with self.lifespan_context(app):
File "/root/.cache/pypoetry/virtualenvs/zhenxun-bot-UH4sDRIh-py3.9/lib/python3.9/site-packages/starlette/routing.py", line 566, in aenter
await self._router.startup()
File "/root/.cache/pypoetry/virtualenvs/zhenxun-bot-UH4sDRIh-py3.9/lib/python3.9/site-packages/starlette/routing.py", line 648, in startup
await handler()
File "/home/zhenxun_bot/utils/browser.py", line 21, in start_browser
_browser = await _playwright.chromium.launch()
File "/root/.cache/pypoetry/virtualenvs/zhenxun-bot-UH4sDRIh-py3.9/lib/python3.9/site-packages/playwright/async_api/_generated.py", line 14007, in launch
await self._impl_obj.launch(
File "/root/.cache/pypoetry/virtualenvs/zhenxun-bot-UH4sDRIh-py3.9/lib/python3.9/site-packages/playwright/_impl/_browser_type.py", line 93, in launch
Browser, from_channel(await self._channel.send("launch", params))
File "/root/.cache/pypoetry/virtualenvs/zhenxun-bot-UH4sDRIh-py3.9/lib/python3.9/site-packages/playwright/_impl/_connection.py", line 44, in send
return await self._connection.wrap_api_call(
File "/root/.cache/pypoetry/virtualenvs/zhenxun-bot-UH4sDRIh-py3.9/lib/python3.9/site-packages/playwright/_impl/_connection.py", line 419, in wrap_api_call
return await cb()
File "/root/.cache/pypoetry/virtualenvs/zhenxun-bot-UH4sDRIh-py3.9/lib/python3.9/site-packages/playwright/_impl/_connection.py", line 79, in inner_send
result = next(iter(done)).result()
playwright._impl._api_types.Error: Executable doesn't exist at /root/.cache/ms-playwright/chromium-1041/chrome-linux/chrome
╔════════════════════════════════════════════════════════════╗
║ Looks like Playwright was just installed or updated. ║
║ Please run the following command to download new browsers: ║
║ ║
║ playwright install ║
║ ║
║ <3 Playwright Team ║
╚════════════════════════════════════════════════════════════╝

02-27 02:34:11 [ERROR] uvicorn | Application startup failed. Exiting.

zhenxun_bot启动出现一些问题

image
image

使用一键部署脚本启动的,除了手动更改python版本为3.9以及部署数据库以外其余未操作。
zhenxun_bot启动出现了一些问题,不知道要如何解决。

在ubuntu容器里运行导入sql时权限不足

原因是 TMP_DIR="$(mktemp -d)"
这里创建的临时目录的权限是700, 然后把sql放进去后

cat > ${TMP_DIR}/sql.sql <<-EOF
CREATE USER zhenxun WITH PASSWORD 'zxpassword';
CREATE DATABASE zhenxun OWNER zhenxun;
EOF

su postgres -c "psql -f ${TMP_DIR}/sql.sql"

因为postgres不能读取root创建的700临时目录, 就出现了
psql: error: /tmp/tmp.r0lnnDTUn7/sql.sql: Permission denied

提个install.sh的小建议

我是把install.sh作为整个bot的启动器来用,包括查看日志之类的,由于菜单里的8是卸载zhenxun_bot以及go-cqhttp,有一次想查看日志的时候手快按了个8回车,还没反应过来就给删的干干净净。这个卸载感觉可以换个数字,或者加一个二次确认,防止手贱。比如我是考虑把8改成789之类的

抽卡文件判断机制有问题

  echo -e "${info} 开始下载抽卡相关资源..."
  if [[ -e "${WORK_DIR}/zhenxun_bot/draw_card" ]]; then
      echo -e "${info} 抽卡资源文件已存在,跳过下载"
  else
      SOURCE_URL=https://pan.yropo.top/source/zhenxun/
      wget ${SOURCE_URL}data_draw_card.tar.gz -qO ~/.cache/data_draw_card.tar.gz \
          && wget ${SOURCE_URL}img_draw_card.tar.gz -qO ~/.cache/img_draw_card.tar.gz \
          && tar -zxf ~/.cache/data_draw_card.tar.gz -C ${WORK_DIR}/zhenxun_bot/ \
          && tar -zxf ~/.cache/img_draw_card.tar.gz -C ${WORK_DIR}/zhenxun_bot/ \
          && rm -rf ~/.cache/*.tar.gz
  fi

如代码,貌似是判断zhenxun_bot目录下有无draw_card,但是目前版本的data_draw_card.tar.gz和img_draw_card.tar.gz两个文件解压到指定位置后也照样没有draw_card目录。
而且,我试着ubuntu下这个判断方法好像不行,试了几个确定存在的目录,都报不存在

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.