FROM python:3.12-slim
ENV PYTHONDONTWRITEBYTECODE=1 PYTHONUNBUFFERED=1
WORKDIR /srv
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
COPY cp ./cp
COPY pricing.json .
RUN useradd -u 10001 -M -s /usr/sbin/nologin cp
USER 10001
EXPOSE 8080
CMD ["uvicorn", "cp.main:app", "--host", "0.0.0.0", "--port", "8080", "--proxy-headers", "--forwarded-allow-ips", "*"]
