物料-采购件入库页面功能实现
This commit is contained in:
17
inventory-backend/Dockerfile
Normal file
17
inventory-backend/Dockerfile
Normal file
@ -0,0 +1,17 @@
|
||||
# 【修改】使用与你环境一致的 Python 3.8
|
||||
FROM python:3.8
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
# 1. 复制依赖并安装
|
||||
COPY requirements.txt .
|
||||
# 安装依赖 + gunicorn
|
||||
RUN pip install --no-cache-dir -r requirements.txt && \
|
||||
pip install --no-cache-dir gunicorn
|
||||
|
||||
# 2. 复制后端代码
|
||||
COPY . .
|
||||
|
||||
# 3. 启动命令
|
||||
# 假设你的入口文件是 run.py,实例叫 app
|
||||
CMD ["gunicorn", "-w", "4", "-b", "0.0.0.0:8000", "run:app"]
|
||||
Reference in New Issue
Block a user