diff --git a/server/Dockerfile b/server/Dockerfile index 9f49cc8..7c0093a 100644 --- a/server/Dockerfile +++ b/server/Dockerfile @@ -1,4 +1,12 @@ FROM python:3.13-slim-bookworm + +# Install system dependencies and build tools first +# Clean up apt cache in the same layer to keep image size down +RUN apt-get update && apt-get install -y --no-install-recommends \ + build-essential \ + gcc \ + && rm -rf /var/lib/apt/lists/* + COPY --from=ghcr.io/astral-sh/uv:latest /uv /bin/uv WORKDIR /app @@ -9,11 +17,11 @@ COPY . /app/ RUN uv sync --frozen -ENV PATH="/app/.venv/bin:$PATH" -ENV DJANGO_SETTINGS_MODULE=chatgptserver.settings -ENV PYTHONUNBUFFERED=1 -ENV DEBUG=True -ENV ALLOWED_HOSTS=localhost,127.0.0.1 +ENV PATH="/app/.venv/bin:$PATH" \ + DJANGO_SETTINGS_MODULE=chatgptserver.settings \ + PYTHONUNBUFFERED=1 \ + DEBUG=True \ + ALLOWED_HOSTS="localhost,127.0.0.1" EXPOSE 8000