Initial commit
This commit is contained in:
21
dockerfile
Normal file
21
dockerfile
Normal file
@@ -0,0 +1,21 @@
|
||||
FROM docker.mirrors.kakunet.top/library/python:3.12-slim
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
# 安装uv包管理器,使用清华源
|
||||
RUN pip3 install uv -i https://mirrors.aliyun.com/pypi/simple
|
||||
|
||||
# 复制依赖文件
|
||||
COPY pyproject.toml uv.lock ./
|
||||
|
||||
# 安装依赖
|
||||
RUN uv sync -i https://mirrors.aliyun.com/pypi/simple
|
||||
|
||||
# 复制项目代码
|
||||
COPY . .
|
||||
|
||||
# 暴露端口
|
||||
EXPOSE 8000
|
||||
|
||||
# 启动命令
|
||||
CMD ["uv", "run", "uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8000", "--log-level", "debug"]
|
||||
Reference in New Issue
Block a user