---
url: /templates/vitepress.md
description: Start a documentation site for deployment with DockIY.
---

# VitePress template

The [DockIY VitePress template](https://codeberg.org/chris-paganon/dockiy-vitepress)
is a documentation site starter that builds to static files and deploys behind
Caddy and Traefik.

## Stack

* [VitePress](https://vitepress.dev/)
* [Vue](https://vuejs.org/guide/introduction.html)
* [Docker Compose](https://docs.docker.com/compose/)
* [Caddy](https://caddyserver.com/docs/)
* [Traefik](https://doc.traefik.io/traefik/)

The production image contains the generated site, but not the source code or
JavaScript runtime.

## Requirements

Install these tools on your computer:

* [Node.js 24+](https://nodejs.org/en/download/)
* [pnpm 11+](https://pnpm.io/installation)
* [Git](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git)
* [Docker Engine](https://docs.docker.com/engine/install/) and [Docker Compose](https://docs.docker.com/compose/install/)
* the [DockIY CLI](/guide/installation) for deployment

## Develop locally

Create a project from the template:

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

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

```bash
pnpm build
pnpm preview
```

## Configure deployment

The DockIY base stack must already be running. Edit `dockiy.yml` in the project
root and set the application name and public hostname:

```yaml
name: my-docs

environments:
  default:
    host: docs.example.com
    compose_file: docker-compose.yml
```

Set the VPS connection in the global DockIY config. For a checkout-specific
override, create an uncommitted `dockiy.config.yml` in the project root. See
the [configuration reference](/config/) for the config file locations and
precedence.

The template's `docker-compose.yml` and files under `scripts/` are already
wired for deployment. Edit them only when changing the container or deployment
behavior.

## Deploy

Commit the application, then follow [Deploying applications](/guide/deploying-apps)
for the deployment, status, version, and rollback commands:

```bash
git add .
git commit -m "feat: configure application"
dockiy app deploy --version v1.0.0
```
