diff --git a/NEWS b/NEWS index 762c3ea2..12c1f957 100644 --- a/NEWS +++ b/NEWS @@ -11,6 +11,8 @@ * #1269: Fix the ZFS hook to support datasets with a "canmount" property of "noauto". * #1270: Follow symlinks when backing up borgmatic configuration files to support the "bootstrap" action. + * #1274: Add an optional override for the documentation development listen port and use Podman + Compose if present. * Add a policy about the use of generative AI in the borgmatic codebase: https://torsion.org/borgmatic/how-to/develop-on-borgmatic/#use-of-generative-ai diff --git a/docs/how-to/develop-on-borgmatic.md b/docs/how-to/develop-on-borgmatic.md index 7c0b9077..cefa5abe 100644 --- a/docs/how-to/develop-on-borgmatic.md +++ b/docs/how-to/develop-on-borgmatic.md @@ -225,9 +225,11 @@ borgmatic's developer build for documentation optionally supports using [Podman](https://podman.io/) instead of Docker. Setting up Podman is outside the scope of this documentation. But once you -install and configure Podman, then `scripts/dev-docs` should automatically use -Podman instead of Docker (make sure you have -[`podman-compose`](https://github.com/containers/podman-compose) installed). +install and configure Podman, then `scripts/dev-docs` automatically uses Podman +instead of Docker and [Podman +Compose](https://github.com/containers/podman-compose) (if present) instead of +Docker Compose. However Podman works fine with either Podman Compose or Docker +Compose. ## Use of generative AI diff --git a/scripts/dev-docs b/scripts/dev-docs index 405dc791..c200728c 100755 --- a/scripts/dev-docs +++ b/scripts/dev-docs @@ -7,6 +7,12 @@ if command -v podman-compose >/dev/null 2>&1; then export CONTAINER_SOCKET_PATH="${XDG_RUNTIME_DIR:-/run/user/$UID}/podman/podman.sock" else COMPOSE_CMD="docker-compose" + USER_PODMAN_SOCKET_PATH=/run/user/$UID/podman/podman.sock + export CONTAINER_SOCKET_PATH="$USER_PODMAN_SOCKET_PATH" + + if [ -e "$USER_PODMAN_SOCKET_PATH" ]; then + export DOCKER_HOST="unix://$USER_PODMAN_SOCKET_PATH" + fi fi BUILDKIT_PROGRESS=plain $COMPOSE_CMD --file docs/docker-compose.yaml up --build --force-recreate