Skip to main content

Docusaurus on Kubernetes

Docusaurus logoDocusaurus logo

Documentation sites, like the one you are reading.

larakube docs:new
🟡 Not yet verifiedNo backing services to shareTypeScriptScaffolds via official CLI

Docusaurus builds documentation sites into plain files — this site is one. LaraKube CLI runs its dev server with live reload on your machine, and serves the built site from a tiny Caddy image in production.

Not yet verified

The Docusaurus scaffolder has not been run end to end yet. Try it, but don't promise it to a client until this badge turns green.

🚀 Create a project

larakube docs:new handbook

LaraKube CLI runs the official create-docusaurus inside a node:24-alpine container and hands you its wizard.

FlagWhat it does
--template=classicPass a create-docusaurus template through and skip its wizard
--typescriptUse the TypeScript variant, skipping the language prompt
--fastSkip the wizard and take classic with TypeScript

Already have a Docusaurus project?

Run this from its root instead:

larakube init

LaraKube CLI recognises Docusaurus from its Docusaurus config and pre-selects it; pass --framework= to skip the picker. It adds the same Dockerfile.static, Caddyfile and Kubernetes manifests that a new project gets. Add --dry-run to see the list first without writing anything.

🧱 What LaraKube CLI adds

FileWhat it does
Dockerfile.static and CaddyfileBuilds the site inside Docker and serves build/ from Caddy
.infrastructure/Kubernetes manifests: a dev-server pod locally, the Caddy image in the cloud

Docusaurus has no browser environment-variable prefix; put build-time values in customFields in docusaurus.config.

💻 Run it locally

cd handbook
larakube up

The dev server runs inside the cluster on port 3000. It polls for file changes, because file-change events don't reliably reach a container from a mounted folder on macOS.

☁️ Deploy

larakube env production
larakube cloud:deploy production

➡️ Next