grant-radar / Dockerfile
Riley Coleman
feat: update Docker and Railway config for Streamlit deployment
586cdbc
Raw
History Blame Contribute Delete
716 Bytes
FROM python:3.12-slim
WORKDIR /app
ENV PYTHONUNBUFFERED=1
ENV PYTHONDONTWRITEBYTECODE=1
# Install minimal system dependencies
RUN apt-get update && apt-get install -y \
curl \
&& rm -rf /var/lib/apt/lists/*
# Copy and install Python dependencies
COPY requirements-railway.txt .
RUN pip install --no-cache-dir -r requirements-railway.txt
# Copy application code
COPY . .
# Create logs and cache directories
RUN mkdir -p logs .gradio
EXPOSE 8501
# Health check
HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 \
CMD curl -f http://localhost:8501/ || exit 1
# Run Streamlit
CMD streamlit run streamlit_app.py --server.port=8501 --server.address=0.0.0.0 --logger.level=warning