36 lines
1021 B
Docker
36 lines
1021 B
Docker
FROM python:3.11-slim
|
|
|
|
WORKDIR /app
|
|
|
|
ENV PYTHONDONTWRITEBYTECODE=1 \
|
|
PYTHONUNBUFFERED=1 \
|
|
STREAMLIT_SERVER_PORT=8501 \
|
|
STREAMLIT_SERVER_ADDRESS=0.0.0.0 \
|
|
STREAMLIT_SERVER_HEADLESS=true \
|
|
STREAMLIT_BROWSER_GATHER_USAGE_STATS=false \
|
|
TIMEZONE=America/Sao_Paulo \
|
|
TZ=America/Sao_Paulo
|
|
|
|
RUN apt-get update && apt-get install -y --no-install-recommends \
|
|
curl \
|
|
tzdata \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
RUN python -m pip install --no-cache-dir --upgrade pip
|
|
|
|
COPY app.py monitor_logic.py ./
|
|
|
|
RUN python -m pip install --no-cache-dir \
|
|
"streamlit>=1.28.0" \
|
|
"requests>=2.31.0" \
|
|
"python-dotenv>=1.0.0" \
|
|
"APScheduler>=3.10.0" \
|
|
"pandas>=2.0.0" \
|
|
"pytz>=2023.3"
|
|
|
|
EXPOSE 8501
|
|
|
|
HEALTHCHECK --interval=30s --timeout=10s --start-period=20s --retries=3 \
|
|
CMD curl --fail "http://localhost:8501/_stcore/health" || exit 1
|
|
|
|
CMD ["streamlit", "run", "app.py", "--server.port=8501", "--server.address=0.0.0.0", "--server.headless=true", "--browser.gatherUsageStats=false"] |