完善docker配置

This commit is contained in:
小贺
2025-09-02 22:41:02 +08:00
parent 8de03156e1
commit 6b5603df84
10 changed files with 121 additions and 1 deletions

14
backend/dockerfile Normal file
View File

@@ -0,0 +1,14 @@
FROM python:3.11-slim
WORKDIR /app
# 安装依赖
RUN pip install --no-cache-dir fastapi==0.115.8 uvicorn[standard]==0.34.8 python-multipart
# 复制代码
COPY . .
# 暴露端口
EXPOSE 5000
# 启动命令
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "5000"]