2.8 KiB
2.8 KiB
Frontend Deployment Check & Fix
Issue
Seeing "DBIS Core Banking System - Frontend application deployment pending" on refresh.
Root Cause
This message appears when:
- The frontend hasn't been built (
dist/folder doesn't exist or is empty) - Nginx is pointing to the wrong directory
- The build failed during deployment
Solution
Step 1: Check if Frontend is Built
If you're on the deployment container (VMID 10130):
# Check if dist folder exists
ls -la /opt/dbis-core/frontend/dist/
# Check if it has content
ls -la /opt/dbis-core/frontend/dist/ | head -20
Step 2: Build the Frontend
If the dist/ folder is missing or empty, build the frontend:
cd /opt/dbis-core/frontend
# Install dependencies (if needed)
npm install
# Build the application
npm run build
Step 3: Verify Nginx Configuration
Check that nginx is pointing to the correct directory:
# Check nginx config
cat /etc/nginx/sites-available/dbis-frontend | grep root
# Should show:
# root /opt/dbis-core/frontend/dist;
Step 4: Restart Nginx
After building, restart nginx:
systemctl restart nginx
systemctl status nginx
Step 5: Verify Build Output
Check that index.html exists in dist:
ls -la /opt/dbis-core/frontend/dist/index.html
cat /opt/dbis-core/frontend/dist/index.html | head -10
Quick Fix Script
Run this on the frontend container (VMID 10130):
#!/bin/bash
cd /opt/dbis-core/frontend
# Check if node_modules exists
if [ ! -d "node_modules" ]; then
echo "Installing dependencies..."
npm install
fi
# Build the application
echo "Building frontend..."
npm run build
# Verify build
if [ -f "dist/index.html" ]; then
echo "✅ Build successful!"
echo "Restarting nginx..."
systemctl restart nginx
echo "✅ Frontend should now be accessible"
else
echo "❌ Build failed - check errors above"
exit 1
fi
From Proxmox Host
If you need to run this from the Proxmox host:
# SSH into the container
pct exec 10130 -- bash
# Then run the build commands above
Or run directly:
pct exec 10130 -- bash -c "cd /opt/dbis-core/frontend && npm run build && systemctl restart nginx"
Troubleshooting
Build Errors
If npm run build fails:
- Check Node.js version:
node --version(should be 18+) - Check for TypeScript errors
- Check for missing dependencies
- Review build output for specific errors
Nginx Errors
If nginx fails to start:
- Test config:
nginx -t - Check logs:
journalctl -u nginx -n 50 - Verify directory permissions
Still Seeing Placeholder
If you still see the placeholder message:
- Clear browser cache
- Check browser console for errors
- Verify you're accessing the correct IP/URL
- Check nginx access logs:
tail -f /var/log/nginx/access.log