diff --git a/{{cookiecutter.project_slug}}/compose/local/django/Dockerfile b/{{cookiecutter.project_slug}}/compose/local/django/Dockerfile index f387f4579..19b13c8b2 100644 --- a/{{cookiecutter.project_slug}}/compose/local/django/Dockerfile +++ b/{{cookiecutter.project_slug}}/compose/local/django/Dockerfile @@ -18,6 +18,7 @@ RUN apt-get update && apt-get install --no-install-recommends -y \ # Requirements are installed here to ensure they will be cached. RUN --mount=type=cache,target=/root/.cache/uv \ --mount=type=bind,source=pyproject.toml,target=pyproject.toml \ + --mount=type=bind,source=uv.lock,target=uv.lock \ uv sync --no-install-project ADD . ${APP_HOME} diff --git a/{{cookiecutter.project_slug}}/compose/production/django/Dockerfile b/{{cookiecutter.project_slug}}/compose/production/django/Dockerfile index 1f0bf8a28..0cb65db5e 100644 --- a/{{cookiecutter.project_slug}}/compose/production/django/Dockerfile +++ b/{{cookiecutter.project_slug}}/compose/production/django/Dockerfile @@ -27,6 +27,10 @@ RUN npm run build FROM ghcr.io/astral-sh/uv:python3.12-bookworm-slim AS python-build-stage ENV UV_COMPILE_BYTECODE=1 UV_LINK_MODE=copy +ARG APP_HOME=/app + +WORKDIR ${APP_HOME} + # Install apt packages RUN apt-get update && apt-get install --no-install-recommends -y \ # dependencies for building Python packages