feat: 增加docker配置

This commit is contained in:
说啥呢 2023-11-22 16:54:55 +08:00 committed by “Folltoshe”
parent 8fbabbe2b2
commit a09012f7af
2 changed files with 24 additions and 0 deletions

14
Dockerfile Normal file
View File

@ -0,0 +1,14 @@
# 设置基础镜像
FROM python:3.9
# 设置工作目录
WORKDIR /app
# 复制项目文件到工作目录
COPY . /app
# 安装依赖
RUN pip install --no-cache-dir -r requirements.txt
# 运行应用程序
CMD [ "python", "main.py" ]

10
docker-compose.yml Normal file
View File

@ -0,0 +1,10 @@
version: '1'
name: 'lx-music'
services:
api:
build: .
restart: always
ports:
- "9763:9763"
volumes:
- .:/app