Skip to content

Commit

Permalink
docs: update local deploy.
Browse files Browse the repository at this point in the history
  • Loading branch information
EstrellaXD committed Oct 9, 2023
1 parent 8acd09e commit 2a4e7af
Show file tree
Hide file tree
Showing 3 changed files with 53 additions and 76 deletions.
17 changes: 2 additions & 15 deletions docs/.vitepress/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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",
},
],
},
Expand Down
51 changes: 51 additions & 0 deletions docs/deploy/local.md
Original file line number Diff line number Diff line change
@@ -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
```
61 changes: 0 additions & 61 deletions docs/deploy/wsl.md

This file was deleted.

0 comments on commit 2a4e7af

Please sign in to comment.