55 lines
1.4 KiB
Markdown
55 lines
1.4 KiB
Markdown
|
|
# Navi Deployment
|
||
|
|
|
||
|
|
## Source Repository
|
||
|
|
|
||
|
|
**Location:** VM 1130 (`192.168.1.130`) at `/home/zvx/projects/repos/navi`
|
||
|
|
|
||
|
|
> **WARNING:** Never deploy from `/home/zvx/projects/navi-work` on cortex — that clone is stale.
|
||
|
|
|
||
|
|
## Build & Deploy
|
||
|
|
|
||
|
|
```bash
|
||
|
|
# SSH to VM 1130
|
||
|
|
ssh recon-vm
|
||
|
|
|
||
|
|
# Always backup first
|
||
|
|
cp -r /mnt/nav/frontend /mnt/nav/frontend.bak.$(date +%Y%m%d-%H%M%S)
|
||
|
|
|
||
|
|
# Build and deploy
|
||
|
|
cd /home/zvx/projects/repos/navi
|
||
|
|
npm run build && rsync -av --delete dist/ /mnt/nav/frontend/
|
||
|
|
```
|
||
|
|
|
||
|
|
## Infrastructure
|
||
|
|
|
||
|
|
- **Nginx** on VM 1130 serves `/mnt/nav/frontend/` on port 8440
|
||
|
|
- `index.html`: no-cache (always fresh)
|
||
|
|
- Hashed assets (`*.js`, `*.css`): cache forever
|
||
|
|
- **Caddy** on CT 101 routes `navi.echo6.co` → VM 1130:8440
|
||
|
|
|
||
|
|
## Pre-Deploy Checklist
|
||
|
|
|
||
|
|
1. Merge feature branch to master before deploying
|
||
|
|
2. Check for unmerged upstream commits:
|
||
|
|
```bash
|
||
|
|
git log your-branch..master --oneline
|
||
|
|
```
|
||
|
|
3. Create backup (see above)
|
||
|
|
|
||
|
|
## Post-Deploy Smoke Tests
|
||
|
|
|
||
|
|
Run after **every** deploy:
|
||
|
|
|
||
|
|
- [ ] Route between two addresses — polyline renders
|
||
|
|
- [ ] Click city label — boundary outline appears
|
||
|
|
- [ ] Theme switching works (dark, light, clean, cyberpunk)
|
||
|
|
- [ ] Toggle overlays (hillshade, contours, public lands)
|
||
|
|
- [ ] Console: no `bt is not defined` or `f is not defined` errors
|
||
|
|
|
||
|
|
## Rollback
|
||
|
|
|
||
|
|
```bash
|
||
|
|
# If deploy fails, restore backup
|
||
|
|
rm -rf /mnt/nav/frontend
|
||
|
|
mv /mnt/nav/frontend.bak.YYYYMMDD-HHMMSS /mnt/nav/frontend
|
||
|
|
```
|