docs: fix frontend deploy instructions — rsync dist/, not the repo root
The previous deploy snippet rsync'd the UI repo root (excluding dist/), which pushed the Vite DEV index.html (<script src=/src/main.tsx>) to production and rendered a blank page. Correct to build then rsync the dist/ output with --delete.
This commit is contained in:
@ -52,7 +52,9 @@ Auth: voicemail `pin` from `voicemail.conf`. No separate portal passwords.
|
||||
- Sudo requires password. Use `SUDO_ASKPASS=/home/jp/.hermes/askpass.sh` with `sudo -A <cmd>`.
|
||||
- `sudo bash <script>` is blocked (nested root shell). Run privileged steps as individual `sudo -A <cmd>` calls.
|
||||
- Deploy backend: `sudo -A cp /home/jp/asterisk-vm/vm_api.py /opt/vm-transcribe/vm_api.py && sudo -A systemctl restart vm-api`.
|
||||
- Deploy frontend: `sudo -A rsync -a --exclude 'node_modules' --exclude 'dist' /home/jp/Work/voicemail-ui/ /home/txt3/domains/vm.txt3.net/public_html/`.
|
||||
- Deploy frontend: build in the UI repo, then rsync the **`dist/`** output (not the repo root) to the web root:
|
||||
`cd /home/jp/Work/voicemail-ui && npm install && npm run build && sudo rsync -a --delete dist/ /home/txt3/domains/vm.txt3.net/public_html/`.
|
||||
NOTE: deploy `dist/`, never the repo root — the root `index.html` is the Vite *dev* entry (`<script src="/src/main.tsx">`) and will render a blank page in production.
|
||||
|
||||
---
|
||||
|
||||
|
||||
Reference in New Issue
Block a user