FROM python:3.12-slim-bookworm

RUN mkdir /test && \
    mkdir /data && \
    pip install --root-user-action=ignore --no-cache-dir --upgrade pip && \
    pip install --root-user-action=ignore --no-cache-dir --disable-pip-version-check \
    "fastapi~=0.115.0"  \
    "SQLAlchemy~=2.0.0"  \
    "pyjwt~=2.8.0" \
    "pydantic~=2.7.1" \
    "pydantic-settings~=2.2.1" \
    "PyYAML~=6.0.1" \
    "cryptography~=42.0.0" \
    "uvicorn~=0.29.0" \
    "pytest~=8.1.0" \
    "httpx~=0.27.0" \
    "python-multipart~=0.0.19"

COPY [ "src/main", "/home" ]
COPY [ "src/data", "/data" ]
EXPOSE 8000/tcp
VOLUME [ "/home", "/mnt", "/data" ]
ENTRYPOINT [ "/home/entrypoint.sh" ]
