Skip to content
Open
Show file tree
Hide file tree
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
12 changes: 6 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@
# tools. (i.e. podman)
CONTAINER_TOOL ?= docker

# Docker image name for the mkdocs based local development setup
# Docker image name for the VitePress based local development setup
IMAGE=ironcore-dev/ironcore-dev.github.io

.PHONY: startdocs
startdocs: ## Start the local mkdocs based development environment.
docker build -t $(IMAGE) -f docs/Dockerfile . --load
docker run --rm -p 5173:5173 -v `pwd`/:/app $(IMAGE)
startdocs: ## Start the local VitePress based development environment.
$(CONTAINER_TOOL) build -t $(IMAGE) -f docs/Dockerfile . --load
$(CONTAINER_TOOL) run --rm -p 5173:5173 -v `pwd`/:/app -v /app/node_modules $(IMAGE)

.PHONY: cleandocs
cleandocs: ## Remove all local mkdocs Docker images (cleanup).
docker container prune --force --filter "label=project=ironcore_docs"
cleandocs: ## Remove all local VitePress Docker images (cleanup).
$(CONTAINER_TOOL) image prune --all --force --filter "label=project=ironcore_docs"
8 changes: 8 additions & 0 deletions hack/start-docs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,14 @@
# Install dependencies
npm ci

# Enable file polling: inotify events from macOS host edits do not reach the container through
# Docker Desktop's bind mount, so live-reload only works with chokidar's polling watcher.
#
# Note on Linux polling is not required and these exports could be guarded to macOS. However, for
# simplicity, keeping it uniform.
export CHOKIDAR_USEPOLLING=true
export CHOKIDAR_INTERVAL=2000

# Run VitePress dev server
npx vitepress dev docs --host 0.0.0.0 &

Expand Down
Loading