diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..5c39c94 --- /dev/null +++ b/Dockerfile @@ -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" ] diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..925fd95 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,10 @@ +version: '1' +name: 'lx-music' +services: + api: + build: . + restart: always + ports: + - "9763:9763" + volumes: + - .:/app