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 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.
|
- `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 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.
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|||||||
@ -201,12 +201,12 @@ npm install
|
|||||||
npm run build # outputs dist/
|
npm run build # outputs dist/
|
||||||
```
|
```
|
||||||
|
|
||||||
Deploy the static build to the web root (Apache serves it and proxies `/api/`
|
Deploy the **`dist/` output** (not the repo root) to the web root — the root
|
||||||
to :8098 and `/audio/` to :8099):
|
`index.html` is the Vite *dev* entry (`<script src="/src/main.tsx">`) and would
|
||||||
|
render a blank page in production:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
sudo -A rsync -a --exclude node_modules --exclude dist \
|
sudo rsync -a --delete dist/ /home/txt3/domains/vm.txt3.net/public_html/
|
||||||
/home/jp/Work/voicemail-ui/ /home/txt3/domains/vm.txt3.net/public_html/
|
|
||||||
```
|
```
|
||||||
|
|
||||||
Keep this repo's copy in sync for documentation/commit purposes:
|
Keep this repo's copy in sync for documentation/commit purposes:
|
||||||
|
|||||||
Reference in New Issue
Block a user