File size: 734 Bytes
3d8ce79 ff19147 2494b91 3d8ce79 ff19147 3d8ce79 ff19147 3d8ce79 ff19147 2494b91 3d8ce79 2494b91 3d8ce79 ff19147 918234e | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | FROM python:3.9-slim
WORKDIR /app
# Install curl for health check
RUN apt-get update && apt-get install -y curl && rm -rf /var/lib/apt/lists/*
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
COPY . .
# Expose Streamlit's default port
EXPOSE 8501
# Disable CSRF and CORS (override any config file)
ENV STREAMLIT_SERVER_ENABLE_XSRF_PROTECTION=false
ENV STREAMLIT_SERVER_ENABLE_CORS=false
ENV STREAMLIT_SERVER_MAX_UPLOAD_SIZE=200
# Health check to ensure the app is running
HEALTHCHECK CMD curl --fail http://localhost:8501/_stcore/health || exit 1
# Run the app (note: path includes src/ folder)
ENTRYPOINT ["streamlit", "run", "src/streamlit_app.py", "--server.port=8501", "--server.address=0.0.0.0"] |