Skip to content

Commit

Permalink
Fix Docker builds
Browse files Browse the repository at this point in the history
  • Loading branch information
IndrajeetPatil committed Oct 24, 2024
1 parent f002c97 commit 5f8b2b6
Showing 1 changed file with 13 additions and 5 deletions.
18 changes: 13 additions & 5 deletions server/Dockerfile
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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

Expand Down

0 comments on commit 5f8b2b6

Please sign in to comment.