From 54a6e48120c768bf1cfacda1ca3eff8b808b9338 Mon Sep 17 00:00:00 2001 From: James Keasley Date: Wed, 15 Nov 2023 16:15:00 +0000 Subject: [PATCH] Fix the build The build of the nhsx site was being broken by some incompatible changes which had been made to poetry. These changes enforce the use of poetry 1.2.2 which works with the pyproject file as currently configured, and should allow the build to complete allowing the site to be deployed again. to test: download this branch, and uncomment the line 127 in docker/web/Dockerfile then run script/setup to build the site. confirm that the build completes. this should confirm that the build as configured in Dockerfile-prod will work as expected. --- app/pyproject.toml | 6 +++--- docker/web/Dockerfile | 2 +- docker/web/Dockerfile-prod | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/app/pyproject.toml b/app/pyproject.toml index 83b401ae..a11815b5 100644 --- a/app/pyproject.toml +++ b/app/pyproject.toml @@ -2,8 +2,8 @@ name = "NHSX" version = "0.1.0" description = "NHSX Wagtail site" -authors = ["andy@hactar.is"] -maintainers = ["dragon@dxw.com"] +authors = ["Andy "] +maintainers = ["dragon "] [tool.poetry.dependencies] python = "^3.7" @@ -63,5 +63,5 @@ pytest-sugar = "*" [build-system] -requires = ["poetry>=0.12"] +requires = ["poetry=1.2.2"] build-backend = "poetry.masonry.api" diff --git a/docker/web/Dockerfile b/docker/web/Dockerfile index 3637b55d..e62e05f8 100644 --- a/docker/web/Dockerfile +++ b/docker/web/Dockerfile @@ -124,7 +124,7 @@ RUN mv ./node_modules/ /usr/srv/deps COPY ./app/pyproject.toml /usr/srv/app/pyproject.toml COPY ./app/poetry.lock /usr/srv/app/poetry.lock ## self update disabled currently due to causing timeout issues in the deploy -#RUN $HOME/.local/bin/poetry self update && \ +#RUN $HOME/.local/bin/poetry self update 1.2.2 && \ RUN $HOME/.local/bin/poetry install diff --git a/docker/web/Dockerfile-prod b/docker/web/Dockerfile-prod index 569ad099..aed02a7d 100644 --- a/docker/web/Dockerfile-prod +++ b/docker/web/Dockerfile-prod @@ -120,7 +120,7 @@ RUN mkdir -p /usr/srv/deps RUN mv ./node_modules/ /usr/srv/deps # POETRY (working and installed in django-base) -RUN $HOME/.local/bin/poetry self update && \ +RUN $HOME/.local/bin/poetry self update 1.2.2 && \ $HOME/.local/bin/poetry install