mirror of
https://github.com/MeoProject/lx-music-api-server.git
synced 2025-05-23 19:17:41 +08:00
feat: 增加docker配置
This commit is contained in:
parent
8fbabbe2b2
commit
a09012f7af
14
Dockerfile
Normal file
14
Dockerfile
Normal 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
10
docker-compose.yml
Normal file
@ -0,0 +1,10 @@
|
||||
version: '1'
|
||||
name: 'lx-music'
|
||||
services:
|
||||
api:
|
||||
build: .
|
||||
restart: always
|
||||
ports:
|
||||
- "9763:9763"
|
||||
volumes:
|
||||
- .:/app
|
Loading…
x
Reference in New Issue
Block a user