Files
etf/Dockerfile
aszerW c5ec9cfe04 docs: Dockerfile添加Flask服务启动命令注释
修改内容:
- 将Flask服务启动命令作为主CMD(取消注释)
- 将定时任务调度器作为备选(注释掉)
- 添加注释说明如何切换

当前默认启动Flask服务:
CMD ["python", "datasource/flask_server.py", "--host", "0.0.0.0"]

如需切换回调度器:
1. 注释掉Flask服务的CMD
2. 取消注释定时调度器的CMD
2026-05-12 23:58:53 +08:00

27 lines
663 B
Docker
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

FROM index-base:latest
# 设置工作目录
WORKDIR /app
# 复制依赖文件
COPY requirements.txt .
RUN uv pip install --system -r requirements.txt
# 仅复制除 data 目录外的应用代码, data 在 dockerignore 中已经被排除
COPY . .
# 创建日志目录
RUN mkdir -p /app/logs
# 设置时区为上海
ENV TZ=Asia/Shanghai
# 暴露端口如需Web服务
EXPOSE 80
# 启动Flask数据API服务默认端口80
CMD ["python", "datasource/flask_server.py", "--host", "0.0.0.0"]
# 运行定时任务调度器如需使用取消下面注释并注释掉上面的CMD
# CMD ["python", "scripts/daily_scheduler.py", "--time", "09:00"]