chore: sync local changes (2026-03-12)
This commit is contained in:
20
mengyalinkfly-backend/Dockerfile
Normal file
20
mengyalinkfly-backend/Dockerfile
Normal file
@@ -0,0 +1,20 @@
|
||||
# 纯后端Docker镜像(前端单独部署)
|
||||
FROM python:3.11-slim
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
# 复制后端文件
|
||||
COPY . .
|
||||
|
||||
# 安装 Python 依赖
|
||||
RUN pip install --no-cache-dir -r requirements.txt && \
|
||||
pip install --no-cache-dir gunicorn
|
||||
|
||||
# 创建持久化数据目录
|
||||
RUN mkdir -p /app/data
|
||||
|
||||
# 暴露端口
|
||||
EXPOSE 7878
|
||||
|
||||
# 启动服务(使用gunicorn)
|
||||
CMD ["gunicorn", "-w", "4", "-b", "0.0.0.0:7878", "app:app"]
|
||||
Reference in New Issue
Block a user