51 lines
2.5 KiB
Markdown
51 lines
2.5 KiB
Markdown
# Deployment Overview
|
|
|
|
Two artifacts, built independently, deployed independently.
|
|
|
|
```
|
|
┌─────────────────────────┐
|
|
│ Server (LXC in RZ) │
|
|
agents ──WSS─>│ - Phoenix release │
|
|
│ - SQLite │
|
|
│ - Caddy (TLS) │
|
|
└─────────────────────────┘
|
|
▲
|
|
│ ssh
|
|
│
|
|
┌─────────────────────────┐
|
|
│ Operator workstation │
|
|
│ - Builds server release│
|
|
│ - Builds agent binary │
|
|
└─────────────────────────┘
|
|
│ scp
|
|
▼
|
|
┌─────────────────────────┐
|
|
│ Proxmox host (any of N) │
|
|
│ - Burrito agent binary │
|
|
│ - systemd unit │
|
|
└─────────────────────────┘
|
|
```
|
|
|
|
## What runs where
|
|
|
|
| Component | Host | Port / Path |
|
|
|-----------|------|------------------------------------------|
|
|
| Caddy | Server LXC | 443 public, forwards → 127.0.0.1:4000 |
|
|
| Phoenix | Server LXC | 127.0.0.1:4000 (HTTP + WS) |
|
|
| SQLite | Server LXC | file at $DATABASE_PATH |
|
|
| Agent | Proxmox host | no listening ports |
|
|
|
|
## Secrets the operator must provide
|
|
|
|
| Variable | Where | How to generate |
|
|
|---------------------------|------------|-------------------------------------------------|
|
|
| `SECRET_KEY_BASE` | Server env | `mix phx.gen.secret` |
|
|
| `DASHBOARD_PASSWORD_HASH` | Server env | `mix run -e 'IO.puts(Argon2.hash_pwd_salt("..."))'` |
|
|
| Agent token | Server DB | Admin UI → "Add host" reveals it once |
|
|
|
|
## Build flow
|
|
|
|
1. `cd server && MIX_ENV=prod mix release` → produces `_build/prod/rel/server/`
|
|
2. `cd agent && ./scripts/build-linux.sh` → produces `dist/proxmox-monitor-agent_linux_amd64`
|
|
|
|
See `server/docs/deploy-lxc.md` and `agent/docs/install.md` for step-by-step.
|