RAG_Study / Dockerfile
Ahmad-01's picture
Update Dockerfile
918234e verified
raw
history blame contribute delete
734 Bytes
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"]