Skip to Content

Docker

The docs app is a separate Docker build context at ./docs-site. It builds a standalone Next.js output and serves it on port 3001.

Docs service

docs: build: context: ./docs-site restart: unless-stopped expose: - "3001"

Local production test

From the repository root:

docker compose build docs docker compose up docs

Then browse through Caddy in the full stack or connect to the exposed service from inside the Docker network.

Build behavior

The Dockerfile:

  1. Installs dependencies with npm ci.
  2. Builds the Nextra site with npm run build.
  3. Copies .next/standalone, static assets, and public files.
  4. Starts server.js on port 3001.