Skip to content

Commit

Permalink
API-docs container: use env variable for spec path (#1039)
Browse files Browse the repository at this point in the history
this fixes issue where git is unable to operate on mounted file
  • Loading branch information
sadiqkhoja authored Dec 7, 2023
1 parent e8b3baf commit 5e08f06
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -105,4 +105,4 @@ check-file-headers:
.PHONY: api-docs
api-docs:
(test "$(docker images -q odk-docs)" || docker build --file odk-docs.dockerfile -t odk-docs .) && \
docker run --rm -it -v ./docs/api.yaml:/docs/docs/_static/api-spec/central.yaml -p 8000:8000 odk-docs
docker run --rm -it -v ./docs:/docs/docs/_static/central-spec -p 8000:8000 odk-docs
4 changes: 3 additions & 1 deletion odk-docs.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ RUN sed -i 's/sphinx-autobuild.*/& --host 0.0.0.0/' Makefile

RUN pip3 install -r requirements.txt

ENV API_SPEC_PATH "/docs/docs/_static/central-spec/api.yaml"

EXPOSE 8000

ENTRYPOINT ["/bin/sh", "-c" , "(git pull --autostash) && make autobuild"]
ENTRYPOINT ["/bin/sh", "-c" , "(pip3 install -r requirements.txt) && (git pull --autostash) && make autobuild"]

0 comments on commit 5e08f06

Please sign in to comment.