# 1. Start from a standard Python base image FROM python:3.11-slim # 2. Set the working directory inside the container WORKDIR /app # 3. Copy only the project definition file first to leverage Docker caching COPY ./pyproject.toml ./ # 4. Install uv and then use it to install the project dependencies # This is much faster than standard pip. RUN pip install uv RUN uv pip install --system --no-cache-dir . # 5. Copy the actual dashboard application code into the container COPY . . # 6. Expose the port the dashboard will run on EXPOSE 3000 # 7. Define the command to start the Gunicorn server for production # Gunicorn is a robust server for Flask, and 'eventlet' is required for Socket.IO. CMD ["gunicorn", "--worker-class", "eventlet", "-w", "1", "--bind", "0.0.0.0:3000", "dashboard.app:app"]