FROM python:3.12-slim
WORKDIR /app
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
COPY router.py install.py ./
RUN useradd --uid 10001 --no-create-home --shell /usr/sbin/nologin router
USER 10001:10001
ENV PYTHONDONTWRITEBYTECODE=1 PYTHONUNBUFFERED=1
CMD ["python", "router.py", "--config", "data/config.json", "serve"]
