Skip to content

Commit

Permalink
Merge pull request #355 from nationalarchives/feature/603-css-for-jud…
Browse files Browse the repository at this point in the history
…gments-should-be-shared

CSS for judgments should be shared between editor and public UIs
  • Loading branch information
Laura Porter authored Sep 2, 2022
2 parents 5d869e1 + fbcabb9 commit d8033db
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 270 deletions.
6 changes: 5 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -74,13 +74,17 @@ COPY --chown=django:django ./compose/production/django/start /start
RUN sed -i 's/\r$//g' /start
RUN chmod +x /start


# copy application code to WORKDIR
COPY --chown=django:django . ${APP_HOME}

# make django owner of the WORKDIR directory as well.
RUN chown django:django ${APP_HOME}

# Use Github API to get latest tag for public-ui, then use the tag to get the Judgment CSS
# This Judgment CSS is the "source of truth" for displaying judgments
RUN apt-get update && apt-get install -y jq curl
RUN curl https://raw.githubusercontent.com/nationalarchives/ds-caselaw-public-ui/$(curl -H "Accept: application/vnd.github+json" https://api.github.com/repos/nationalarchives/ds-caselaw-public-ui/releases/latest | jq -r .tag_name)/ds_judgements_public_ui/sass/includes/_judgment_text.scss -o ds_caselaw_editor_ui/sass/includes/_judgment_text.scss

USER django

ENTRYPOINT ["/entrypoint"]
Expand Down
5 changes: 5 additions & 0 deletions compose/local/django/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -56,5 +56,10 @@ RUN pip install --no-cache-dir --no-index --find-links=/wheels/ /wheels/* \
# copy application code to WORKDIR
COPY . ${APP_HOME}

# Use Github API to get latest tag for public-ui, then use the tag to get the Judgment CSS
# This Judgment CSS is the "source of truth" for displaying judgments
RUN apt-get update && apt-get install -y jq curl
RUN curl https://raw.githubusercontent.com/nationalarchives/ds-caselaw-public-ui/$(curl -H "Accept: application/vnd.github+json" https://api.github.com/repos/nationalarchives/ds-caselaw-public-ui/releases/latest | jq -r .tag_name)/ds_judgements_public_ui/sass/includes/_judgment_text.scss -o ds_caselaw_editor_ui/sass/includes/_judgment_text.scss

# Do nothing forever (use 'exec' to resuse the container)
CMD tail -f /dev/null
269 changes: 0 additions & 269 deletions ds_caselaw_editor_ui/sass/includes/_judgment_text.scss

This file was deleted.

0 comments on commit d8033db

Please sign in to comment.