# Deploy notes — bare baseline

You are running native Node, so deploy is "ship the built `dist/`
to a host that has Node 24 + pnpm".

## systemd on a Linux VPS

1. Build on a build host (or in CI):
   ```sh
   pnpm install --frozen-lockfile
   pnpm voltro build .   # per app
   ```
2. Rsync the project to the target host.
3. Install Postgres on the host (or point `DB_URL` at a managed
   service like RDS / Supabase / Neon).
4. Copy `deploy/voltro.service.example` to
   `/etc/systemd/system/voltro-{{appName}}.service`, adjust the
   `WorkingDirectory` and `EnvironmentFile`, then:
   ```sh
   sudo systemctl daemon-reload
   sudo systemctl enable --now voltro-{{appName}}
   sudo systemctl status voltro-{{appName}}
   ```

Per-app you'll want one unit. systemd handles restarts, env file
loading, journald log capture.

## PM2

```sh
pm2 start "pnpm voltro start ." --name {{appName}} --cwd apps/{{appName}}
pm2 save
pm2 startup
```

Easier than systemd, more moving parts.

## When to switch to compose

If your deploy story includes more than one app + a Postgres, and
you're going to want CI to build images, switch to the **compose**
baseline. The native deploy story stays the same as a fallback
either way — switching baselines doesn't ban Node-native runs.
