diff --git a/docs/.vitepress/config.ts b/docs/.vitepress/config.ts index 379af7b5..01aff34d 100644 --- a/docs/.vitepress/config.ts +++ b/docs/.vitepress/config.ts @@ -86,21 +86,8 @@ export default defineConfig({ link: "/deploy/dsm", }, { - text: "WSL", - link: "/deploy/wsl", - }, - ], - }, - { - text: "源码运行", - items: [ - { - text: "Windows 本地部署", - link: "/deploy/windows", - }, - { - text: "Unix 本地部署", - link: "/deploy/unix", + text: "本地部署", + link: "/deploy/local", }, ], }, diff --git a/docs/deploy/local.md b/docs/deploy/local.md new file mode 100644 index 00000000..d84c6381 --- /dev/null +++ b/docs/deploy/local.md @@ -0,0 +1,51 @@ +# 本地部署运行 + +::: warning 警告 +本地部署可能会产生一些不可预料的问题,我们强烈推荐您使用 Docker 部署。 + +本地文档更新可能会有延迟,如有疑问请先在 [ISSUE](https://github.com/EstrellaXD/Auto_Bangumi/issues) 中提出。 +::: + +## 下载最新版本文件 + +```bash +VERSION=$(curl -s "https://api.github.com/repos/EstrellaXD/Auto_Bangumi/releases/latest" | grep '"tag_name":' | sed -E 's/.*"([^"]+)".*/\1/') +curl -L -O "https://github.com/EstrellaXD/Auto_Bangumi/releases/download/$VERSION/app-v$VERSION.zip" +``` + +## 解压代码压缩包 + +Unix 与 WSL 系统可以使用如下命令,Windows 系统请自行解压。 + +```bash +unzip app-v$VERSION.zip -d AutoBangumi +cd AutoBangumi +``` + + +## 创建虚拟环境并且安装依赖 +确认你的电脑本地已经安装了 `python3.10` 以上的版本,以及 `pip` 包管理工具。 + +```bash +python3 -m venv env +python3 pip install -r requirements.txt +``` + +## 运行 AutoBangumi + +```bash +cd src +python3 main.py +``` + + +## Windows 开机自启 + +可以用 `nssm` 来实现开机自启,以下以 `nssm` 为例: + +```powershell +nssm install AutoBangumi (Get-Command python).Source +nssm set AutoBangumi AppParameters (Get-Item .\main.py).FullName +nssm set AutoBangumi AppDirectory (Get-Item ..).FullName +nssm set AutoBangumi Start SERVICE_DELAYED_AUTO_START +``` diff --git a/docs/deploy/wsl.md b/docs/deploy/wsl.md deleted file mode 100644 index a3a14478..00000000 --- a/docs/deploy/wsl.md +++ /dev/null @@ -1,61 +0,0 @@ -# WSL 配置说明 - -感谢 #73 的贡献 - -WSL 用户可以用以下 `docker-compose.yml` 配置文件来部署 AutoBangumi - -```yml -version: "3.6" -services: - qbittorrent: - container_name: qbittorrent - image: johngong/qbittorrent:latest - hostname: qbittorrent - environment: - - QB_EE_BIN=false - - UID=1000 # 用户权限1000 当前WSL登录用户,查询方法 wsl内输入 id 用户名 - - GID=1000 - - QB_WEBUI_PORT=8989 - ports: - - "6881:6881" - - "6881:6881/udp" - - "8989:8989" - volumes: - - qb_config:/config - - /mnt/g/animation:/Downloads #下载路径,对应 Windows上目录是 G:\animation - networks: - - AutoBangumi_network - restart: unless-stopped - - AutoBangumi: - image: "ghcr.io/estrellaxd/auto_bangumi:latest" - container_name: AutoBangumi - ports: - - 7892:7892 - depends_on: - - qbittorrent - volumes: - - ./config:/app/config - - ./data:/app/data - environment: - - PUID=1000 - - PGID=1000 - - TZ=Asia/Shanghai - - AB_DOWNLOADER_HOST=qbittorrent:8989 - - AB_DOWNLOADER_USERNAME=admin - - AB_DOWNLOADER_PASSWORD=adminadmin - - AB_NOT_CONTAIN=720|繁体|CHT|JPTC|繁日|BIG5 - - AB_DOWNLOAD_PATH=/Downloads #qbittorrent 映射的地址,否者可能提示下载失败 - - AB_RSS=https://mikanani.me/RSS/MyBangumi?token=xxxxxxxx%3d%3d #订阅地址,改成自己的 - networks: - - AutoBangumi_network - restart: unless-stopped - -networks: - AutoBangumi_network: -volumes: - qb_config: - external: false - auto_bangumi: - external: false -```