From bf1b8235d7b9c100e407e31c66e73092fc0ee037 Mon Sep 17 00:00:00 2001 From: zhenghu <1831829219@qq.com> Date: Mon, 13 Apr 2026 15:00:14 +0800 Subject: [PATCH] =?UTF-8?q?chore:=20=E8=B0=83=E6=95=B4=20Streamlit=20?= =?UTF-8?q?=E6=9C=8D=E5=8A=A1=E7=AB=AF=E5=8F=A3=E4=BB=8E=208000=20?= =?UTF-8?q?=E5=88=B0=208001?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 更新 Dockerfile 中 EXPOSE、ENV、HEALTHCHECK、CMD 的端口号 - 同步更新 README.md 中的 docker run 示例端口映射 --- Dockerfile | 10 +++++----- README.md | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Dockerfile b/Dockerfile index 5fce0e5..803cf19 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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"] diff --git a/README.md b/README.md index 1ba4394..1a768fb 100644 --- a/README.md +++ b/README.md @@ -81,7 +81,7 @@ just check docker build -t yieldsmart . # 运行容器 -docker run -p 8000:8000 yieldsmart +docker run -p 8001:8001 yieldsmart ``` ## 许可证