Skip to Content
Potik Docs
Runbooks

Build and deploy the documentation site

The site uses Fumadocs and the shadcn theme. It builds from the English Markdown in docs/guides and docs/runbooks. Edit those files to update both the repository and the site. Start each page with a level-one heading and use relative Markdown links between pages. Mermaid code fences render as diagrams with their text available underneath. Links to other repository files point to the corresponding GitHub source.

Preview locally

Use Node.js 24, npm, and Python 3. From the repository root:

cd apps/docs
npm ci
npm run build
npm run check
npm run preview

Open the static preview. Try a direct link to the architecture guide, and search for Northern ridge survey to find the matching paragraph in the Notes walkthrough. The build generates the full-text index at out/search.json. A static file server can serve the exported HTML and assets in out independently. Run npm run dev for editing the site. Rerun npm run content after changing Markdown to update the local development copy.

To run the interactive browser check against a running preview:

npm install --prefix /tmp/potik-docs-browser --no-save playwright
cd /tmp/potik-docs-browser
npx playwright install chromium
cd /path/to/potik-starter/apps/docs
PLAYWRIGHT_MODULE=/tmp/potik-docs-browser/node_modules/playwright node scripts/check-browser.mjs

The check verifies opening a directly linked heading, rendering both flowcharts and sequences, persisting the theme, searching article text, and navigating on a narrow viewport. It prints the directory with screenshots. Set CHROMIUM_EXECUTABLE to use a system Chromium.

Deploy on Coolify

  1. Create a separate Docker Compose resource in the application’s Coolify project. Use the same repository and set the Compose file to deploy/docs/compose.yaml.
  2. Assign your documentation hostname, for example https://docs.example.com, to service docs on port 8080. Point DNS to the Coolify proxy and use its HTTPS certificate. Deploy this resource on its own hostname at the root path.
  3. Optionally set the build argument DOCS_SOURCE_BASE to a source tree URL such as https://github.com/your-org/your-starter/blob/v0.1.0/. It changes repository-source links.
  4. Deploy and check the root health probe, a direct guide URL, diagrams and search through the configured hostname.

The image builds the documentation in a Node.js stage, then serves the static export from Caddy. The static image starts with its default configuration. Locally, docker compose -f deploy/docs/compose.yaml build builds the same image. An internal npm CA can be passed as the optional npm_ca BuildKit secret when building the Dockerfile directly.

On this page