Skip to content

Commit

Permalink
ci: update ci img + docs build from development
Browse files Browse the repository at this point in the history
  • Loading branch information
spwoodcock committed Sep 29, 2023
1 parent 5fde57e commit 6e9ca5a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
1 change: 0 additions & 1 deletion .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ jobs:
- build_openapi_json
with:
image: ghcr.io/hotosm/fmtm/backend:ci-${{ github.ref_name }}
prepend_command: "gosu appuser"
cache_paths: |
docs/apidocs
docs/openapi.json
Expand Down
8 changes: 3 additions & 5 deletions src/backend/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,7 @@ USER appuser


FROM debug-no-odk as ci
# Run all ci as root
USER root
RUN set -ex \
&& apt-get update \
Expand All @@ -155,21 +156,18 @@ RUN set -ex \
"gosu" \
"git" \
&& rm -rf /var/lib/apt/lists/*
USER appuser
COPY --from=extract-deps --chown=appuser \
RUN mv /home/appuser/.local /root/.local
COPY --from=extract-deps \
/opt/python/requirements-ci.txt /opt/python/
RUN pip install --user --upgrade --no-warn-script-location \
--no-cache-dir -r \
/opt/python/requirements-ci.txt \
&& rm -r /opt/python
COPY --chown=appuser tests/ /opt/tests/
# Pre-compile packages to .pyc (init speed gains)
RUN python -c "import compileall; compileall.compile_path(maxlevels=10, quiet=1)"
# Override entrypoint, as not possible in Github action
ENTRYPOINT [""]
CMD [""]
# User root required, use `gosu appuser` in the container
USER root



Expand Down

0 comments on commit 6e9ca5a

Please sign in to comment.