Atualizar Dockerfile

This commit is contained in:
2026-03-27 01:03:32 -03:00
parent 4f6a99e2f7
commit 8eaecc9a9e

View File

@@ -4,7 +4,7 @@ WORKDIR /app
ENV PYTHONDONTWRITEBYTECODE=1 \
PYTHONUNBUFFERED=1 \
STREAMLIT_SERVER_PORT=3000 \
STREAMLIT_SERVER_PORT=8501 \
STREAMLIT_SERVER_ADDRESS=0.0.0.0 \
STREAMLIT_SERVER_HEADLESS=true \
STREAMLIT_BROWSER_GATHER_USAGE_STATS=false \
@@ -18,10 +18,8 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
RUN python -m pip install --no-cache-dir --upgrade pip
# Copia apenas o código necessário da aplicação.
COPY app.py monitor_logic.py ./
# Dependências fixadas diretamente para evitar falha de shell com operadores >=.
RUN python -m pip install --no-cache-dir \
"streamlit>=1.28.0" \
"requests>=2.31.0" \
@@ -33,6 +31,6 @@ RUN python -m pip install --no-cache-dir \
EXPOSE 8501
HEALTHCHECK --interval=30s --timeout=10s --start-period=20s --retries=3 \
CMD curl --fail "http://localhost:${STREAMLIT_SERVER_PORT}/_stcore/health" || exit 1
CMD curl --fail "http://localhost:8501/_stcore/health" || exit 1
CMD ["sh", "-c", "streamlit run app.py --server.port=${STREAMLIT_SERVER_PORT} --server.address=${STREAMLIT_SERVER_ADDRESS} --server.headless=${STREAMLIT_SERVER_HEADLESS} --browser.gatherUsageStats=${STREAMLIT_BROWSER_GATHER_USAGE_STATS}"]
CMD ["streamlit", "run", "app.py", "--server.port=8501", "--server.address=0.0.0.0", "--server.headless=true", "--browser.gatherUsageStats=false"]