Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,17 @@ PORT ?= 8000

ifeq ($(shell command -v docker 2> /dev/null),)
RUNTIME=podman
# Rootless Podman uses pasta. `-p ${PORT}:${PORT}` publishes on IPv6 as well,
# but pasta resets connections to [::1], so http://localhost:${PORT} fails
# (typical in WSL). Bind IPv4 loopback only so browsers fall back to 127.0.0.1.
PUBLISH_ARGS=-p 127.0.0.1:${PORT}:${PORT}
else
RUNTIME=docker
PUBLISH_ARGS=-p ${PORT}:${PORT}
endif

docker-run: pull-config-server generate-template
$(RUNTIME) run --rm --name sdc-docs -v "$$(pwd)":/docs -p ${PORT}:${PORT} --entrypoint ash squidfunk/mkdocs-material:${MKDOCS_MATERIAL_VERSION} -c 'mkdocs serve -a 0.0.0.0:${PORT}'
$(RUNTIME) run --rm --name sdc-docs -v "$$(pwd)":/docs $(PUBLISH_ARGS) --entrypoint ash squidfunk/mkdocs-material:${MKDOCS_MATERIAL_VERSION} -c 'mkdocs serve -a 0.0.0.0:${PORT}'

generate-template:
export $$(cat versions.env | xargs) ; envsubst < docs/user-guide/troubleshooting.tmpl.md > docs/user-guide/troubleshooting.md
Expand Down