From 2165c46cd3168c598bb6c7b29f74c4e1c4ccda75 Mon Sep 17 00:00:00 2001 From: Andreas Zeidler Date: Fri, 4 Oct 2024 13:17:37 +0200 Subject: [PATCH] docs: use Docker Compose to render the docs locally $ cd docs/ $ docker compose up --- bin/docs | 25 ------------------------- docs/compose.yaml | 11 +++++++++++ 2 files changed, 11 insertions(+), 25 deletions(-) delete mode 100755 bin/docs create mode 100644 docs/compose.yaml diff --git a/bin/docs b/bin/docs deleted file mode 100755 index 72378c3..0000000 --- a/bin/docs +++ /dev/null @@ -1,25 +0,0 @@ -#!/bin/bash - -DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" -cd "$DIR/../docs" - -COMMAND=${1:-html} -case $COMMAND in - html) - docker run --rm \ - -v $(pwd)/:/docs/ \ - europe-west3-docker.pkg.dev/zeitonline-engineering/docker-zon/sphinx-zon:latest \ - sphinx-build -j auto -a -b html . ./htdocs - ;; - serve) - docker run --rm \ - -v $(pwd)/:/docs/ \ - -p 8000:8000 \ - europe-west3-docker.pkg.dev/zeitonline-engineering/docker-zon/sphinx-zon:latest \ - sphinx-autobuild --host 0.0.0.0 -j auto -a -b html . ./htdocs - ;; - *) - echo "Unrecognized command: $COMMAND" - exit 1 - ;; -esac diff --git a/docs/compose.yaml b/docs/compose.yaml new file mode 100644 index 0000000..7a62c97 --- /dev/null +++ b/docs/compose.yaml @@ -0,0 +1,11 @@ +version: "3" +services: + docs: + image: europe-west3-docker.pkg.dev/zeitonline-engineering/docker-zon/sphinx-zon:latest + command: sphinx-autobuild --host localhost /docs /docs/htdocs + network_mode: host + restart: always + volumes: + - .:/docs +networks: + default: {}