62 lines
1.4 KiB
Markdown
62 lines
1.4 KiB
Markdown
|
|
# Frontend Fix Instructions
|
||
|
|
|
||
|
|
## Quick Fix Command
|
||
|
|
|
||
|
|
**Run this on your Proxmox host:**
|
||
|
|
|
||
|
|
```bash
|
||
|
|
pct exec 10130 -- bash -c "cd /opt/dbis-core/frontend && npm install && npm run build && systemctl restart nginx"
|
||
|
|
```
|
||
|
|
|
||
|
|
## Or Use the Fix Script
|
||
|
|
|
||
|
|
**On Proxmox host:**
|
||
|
|
|
||
|
|
```bash
|
||
|
|
cd /home/intlc/projects/proxmox/dbis_core
|
||
|
|
./scripts/run-frontend-fix.sh
|
||
|
|
```
|
||
|
|
|
||
|
|
## What This Does
|
||
|
|
|
||
|
|
1. ✅ Installs frontend dependencies (`npm install`)
|
||
|
|
2. ✅ Builds the frontend application (`npm run build`)
|
||
|
|
3. ✅ Creates the `dist/` folder with all assets
|
||
|
|
4. ✅ Restarts nginx to serve the new build
|
||
|
|
|
||
|
|
## Verification
|
||
|
|
|
||
|
|
After running the fix, verify it worked:
|
||
|
|
|
||
|
|
```bash
|
||
|
|
# Check build exists
|
||
|
|
pct exec 10130 -- test -f /opt/dbis-core/frontend/dist/index.html && echo "✅ SUCCESS" || echo "❌ FAILED"
|
||
|
|
|
||
|
|
# Check nginx
|
||
|
|
pct exec 10130 -- systemctl status nginx
|
||
|
|
|
||
|
|
# Test HTTP
|
||
|
|
curl -I http://192.168.11.130
|
||
|
|
```
|
||
|
|
|
||
|
|
## Expected Result
|
||
|
|
|
||
|
|
After the fix:
|
||
|
|
- ✅ Browser shows React app (login page or dashboard)
|
||
|
|
- ✅ No more "deployment pending" message
|
||
|
|
- ✅ All assets load correctly
|
||
|
|
- ✅ No 404 errors in browser console
|
||
|
|
|
||
|
|
## If Still Not Working
|
||
|
|
|
||
|
|
1. **Clear browser cache** (Ctrl+Shift+R or Cmd+Shift+R)
|
||
|
|
2. **Check browser console** for errors
|
||
|
|
3. **Check nginx logs:**
|
||
|
|
```bash
|
||
|
|
pct exec 10130 -- tail -50 /var/log/nginx/error.log
|
||
|
|
```
|
||
|
|
4. **Verify build output:**
|
||
|
|
```bash
|
||
|
|
pct exec 10130 -- ls -la /opt/dbis-core/frontend/dist/
|
||
|
|
```
|