# Python API Server for Vendor Report Generator FROM python:3.11-slim WORKDIR /app # Install system dependencies RUN apt-get update && apt-get install -y \ curl \ && rm -rf /var/lib/apt/lists/* # Copy requirements first for better caching COPY requirements.txt . # Install Python dependencies RUN pip install --no-cache-dir -r requirements.txt # Copy application files COPY . . # Create directories for reports and output RUN mkdir -p /app/reports /app/output # Expose port (internal only, not exposed in docker-compose) EXPOSE 8080 # Health check HEALTHCHECK --interval=30s --timeout=10s --start-period=10s --retries=3 \ CMD curl -f http://localhost:8080/health || exit 1 # Run API server (uses environment variables for configuration) CMD ["python", "api_server.py"]