Skip to content

VitePress template

The DockIY VitePress repository serves two purposes:

  • it is the source of this documentation site;
  • it is a reusable template for deploying any VitePress site to a DockIY VPS.

The production image builds the site with Node.js and pnpm, then copies only the generated static files into a Caddy image. Caddy provides clean URLs, compression, long-lived caching for hashed assets, and the generated VitePress 404 page.

Create a site

Create a new repository from the template, then install its dependencies:

bash
dockiy app init vitepress my-docs
cd my-docs
pnpm install
pnpm dev

You can also clone or fork the template directly. Edit the Markdown pages, .vitepress/config.mts, and files under public/. Run a production build before deploying:

bash
pnpm build
pnpm preview

Configure deployment

The DockIY base stack must already be running. Set the application name, remote_path, registry repository, hostname, and Compose project in dockiy.yml. Set the VPS connection in the global DockIY config or an optional local dockiy.config.yml override.

Deploy

Commit the application, then deploy an explicit version:

bash
dockiy app deploy --version v1.0.0

The CLI creates Git tag v1.0.0 and image tag default-v1.0.0. It builds the static site, pushes the image through an SSH tunnel, and starts the Compose project. The start hook waits for the container healthcheck. No source code or JavaScript runtime remains in the final container.

For the broader deployment model, see Deploying applications.

Released under the MIT License.