chore: 调整 Streamlit 服务端口从 8000 到 8001

- 更新 Dockerfile 中 EXPOSE、ENV、HEALTHCHECK、CMD 的端口号
  - 同步更新 README.md 中的 docker run 示例端口映射
This commit is contained in:
zhenghu
2026-04-13 15:00:14 +08:00
parent 9cb70267b6
commit bf1b8235d7
2 changed files with 6 additions and 6 deletions

View File

@@ -24,11 +24,11 @@ RUN uv sync --frozen --no-dev
# 复制应用代码和其他文件
COPY . .
# 暴露 Streamlit 默认端口
EXPOSE 8000
# 暴露端口
EXPOSE 8001
# 设置环境变量
ENV STREAMLIT_SERVER_PORT=8000 \
ENV STREAMLIT_SERVER_PORT=8001 \
STREAMLIT_SERVER_ADDRESS=0.0.0.0 \
STREAMLIT_SERVER_ENABLE_XSRF_PROTECTION=false \
STREAMLIT_SERVER_ENABLE_CORS=false \
@@ -37,7 +37,7 @@ ENV STREAMLIT_SERVER_PORT=8000 \
# 健康检查
HEALTHCHECK --interval=30s --timeout=3s --start-period=5s --retries=3 \
CMD curl -f http://localhost:8000/_stcore/health || exit 1
CMD curl -f http://localhost:8001/_stcore/health || exit 1
# 运行 Streamlit 应用
CMD ["uv", "run", "streamlit", "run", "app.py", "--server.port=8000", "--server.address=0.0.0.0"]
CMD ["uv", "run", "streamlit", "run", "app.py", "--server.port=8001", "--server.address=0.0.0.0"]