Skip to content

Commit

Permalink
Fix the build
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
jkeasley committed Nov 15, 2023
1 parent 6a5390a commit 54a6e48
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions app/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
name = "NHSX"
version = "0.1.0"
description = "NHSX Wagtail site"
authors = ["andy@hactar.is"]
maintainers = ["dragon@dxw.com"]
authors = ["Andy <andy@hactar.is>"]
maintainers = ["dragon <dragon@dxw.com>"]

[tool.poetry.dependencies]
python = "^3.7"
Expand Down Expand Up @@ -63,5 +63,5 @@ pytest-sugar = "*"


[build-system]
requires = ["poetry>=0.12"]
requires = ["poetry=1.2.2"]
build-backend = "poetry.masonry.api"
2 changes: 1 addition & 1 deletion docker/web/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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


Expand Down
2 changes: 1 addition & 1 deletion docker/web/Dockerfile-prod
Original file line number Diff line number Diff line change
Expand Up @@ -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


Expand Down

0 comments on commit 54a6e48

Please sign in to comment.