Skip to content

Commit

Permalink
新增Docker部署方法
Browse files Browse the repository at this point in the history
  • Loading branch information
liaofulong committed Dec 2, 2023
1 parent d437bfe commit a7bf97d
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 9 deletions.
11 changes: 3 additions & 8 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,14 +1,9 @@
# 设置基础镜像
FROM python:3.9
FROM python:3.10.13-slim-bullseye

# 设置工作目录
WORKDIR /app

# 复制项目文件到工作目录
COPY . /app

# 安装依赖
RUN pip install --no-cache-dir -r requirements.txt
RUN pip install --no-cache -r requirements.txt

# 运行应用程序
CMD [ "python", "main.py" ]
CMD [ "python", "main.py" ]
16 changes: 15 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

## 使用此项目导致的封号等情况与开发者无关

## 部署方法
## 手动部署方法

环境要求:Python 3.8+
没有其他限制,能用Python理论上就能跑起来
Expand All @@ -34,6 +34,20 @@ python main.py # 启动服务

对于release的部署和上方类似,这里不再赘述

## Docker部署(目录映射搞不懂,最好有个宝塔面板啥的)

环境要求:Docker
最低版本要求不知道,最新的bug会少知道这就行

```bash
sudo apt-get update
sudo apt-get install -y docker.io
docker run -p 9763:9763 -d ikun0014/lx-music-api-server-python:latest
```

配置文件填写需要到容器目录里的/app目录填写config.json
小小白还是回去手动部署得了

## 返回码说明

接口返回值中`body.code`字段值中的代码含义
Expand Down

0 comments on commit a7bf97d

Please sign in to comment.