From 53748eb05ac63244116a6970594bd06feee675f9 Mon Sep 17 00:00:00 2001 From: jelmert Date: Tue, 15 Apr 2025 08:43:55 +0200 Subject: [PATCH] Add UV_PYTHON_DOWNLOADS=0 to local Dockerfile and add .venv/lib/python3.12/site-packages to site-packages --- {{cookiecutter.project_slug}}/compose/local/django/Dockerfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/{{cookiecutter.project_slug}}/compose/local/django/Dockerfile b/{{cookiecutter.project_slug}}/compose/local/django/Dockerfile index 201f0d21b..b1ad21b6e 100644 --- a/{{cookiecutter.project_slug}}/compose/local/django/Dockerfile +++ b/{{cookiecutter.project_slug}}/compose/local/django/Dockerfile @@ -9,7 +9,7 @@ ARG APP_HOME=/app WORKDIR ${APP_HOME} # we need to move the virtualenv outside of the $APP_HOME directory because it will be overriden by the docker compose mount -ENV UV_COMPILE_BYTECODE=1 UV_LINK_MODE=copy +ENV UV_COMPILE_BYTECODE=1 UV_LINK_MODE=copy UV_PYTHON_DOWNLOADS=0 # Install apt packages RUN apt-get update && apt-get install --no-install-recommends -y \ @@ -44,6 +44,7 @@ RUN groupadd --gid 1000 dev-user \ {% endif %} ENV PATH="/${APP_HOME}/.venv/bin:$PATH" +ENV PYTHONPATH="${APP_HOME}/.venv/lib/python3.12/site-packages:$PYTHONPATH" COPY ./compose/production/django/entrypoint /entrypoint RUN sed -i 's/\r$//g' /entrypoint