建议使用服务器安装
教程使用系统centos7.6,其他版本自测
1.安装Docker
sudo yum check-update
curl -sSL https://get.daocloud.io/docker | sh
sudo systemctl start docker
sudo systemctl status docker
sudo systemctl enable docker
2.安装docker-compose
curl -L "https://github.com/docker/compose/releases/download/1.23.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
chmod +x /usr/local/bin/docker-compose
3.在root文件夹中新建一个文件夹,文件夹中创建docker-compose.yml(自定义名字)
version: "3"
services:
qinglong:
image: whyour/qinglong:latest
container_name: qinglong
restart: unless-stopped
tty: true
ports:
- 5700:5700
- 5701:5701
environment:
- ENABLE_HANGUP=true
- ENABLE_WEB_PANEL=true
volumes:
- ./config:/ql/config
- ./log:/ql/log
- ./db:/ql/db
- ./repo:/ql/repo
- ./raw:/ql/raw
- ./scripts:/ql/scripts
- ./jbot:/ql/jbot
- ./ninja:/ql/ninja
4. 执行 docker-compose up -d
5. 进入容器执行下列代码
git clone https://github.com/MoonBegonia/ninja.git /ql/ninja
cd /ql/ninja/backend
pnpm install
pm2 start
cp sendNotify.js /ql/scripts/sendNotify.js
6.将以下内容粘贴到 extra.sh(重启后自动更新并启动 Ninja)
cd /ql/ninja/backend
git checkout .
git pull
pnpm install
pm2 start
cp sendNotify.js /ql/scripts/sendNotify.js
本教程参考于@MoonBegonia大佬,如有侵权,请联系删除。
有兴趣的兄弟可以加群进行交流757319249