# Axiom Discord Bot + FastAPI dashboard backend (by HexaHost)
FROM python:3.12-slim-bookworm

ENV PYTHONDONTWRITEBYTECODE=1 \
    PYTHONUNBUFFERED=1 \
    PIP_NO_CACHE_DIR=1 \
    PIP_DISABLE_PIP_VERSION_CHECK=1

WORKDIR /app

RUN apt-get update && apt-get install -y --no-install-recommends \
        gcc \
        libffi-dev \
        libjpeg62-turbo-dev \
        zlib1g-dev \
        libsodium-dev \
    && rm -rf /var/lib/apt/lists/*

COPY requirements.txt .
RUN pip install -r requirements.txt

COPY . .

# Persist SQLite / JSON data outside the image
RUN mkdir -p /app/db /app/jsondb /app/logs

EXPOSE 8000

CMD ["python", "Axiom.py"]
