3.7 KiB
3.7 KiB
BP_WB Deployment Guide
This guide explains how to deploy the BP_WB Website Builder app to BOSA.
Quick Deployment
Run the deployment script from the BOSA apps directory:
cd D:\dev\projects\BOSA\apps
.\deploy_wb.bat
What the Deployment Script Does
- Builds the frontend - Runs
npm run build:frontendto create production build - Copies files to
D:\dev\projects\BOSA\apps\bp_wb\:manifest.yaml- App manifestserver.js- Node.js server entry pointpackage.json- Dependenciesbackend/- Backend API codemigrations/- Database migrationsdist/- Built frontend (React app)docs/- Documentationversion.txt- Version information
- Creates sidebar configuration - Creates
sidebar.jsonfor Super Admin link - Installs dependencies - Runs
npm install --productionin target directory
Sidebar Link Configuration
The app is configured to appear in the BOSA sidebar for Super Admin users only, positioned after the "Themes" link.
Configuration in manifest.yaml:
sidebar:
label: Website Builder
url: /bp_wb/
icon: pencil-square
role: super_admin
position: after
after: themes
Configuration in sidebar.json (created by deployment script):
{
"sidebar": {
"links": [
{
"label": "Website Builder",
"url": "/bp_wb/",
"icon": "pencil-square",
"role": "super_admin",
"position": "after",
"after": "themes"
}
]
}
}
Post-Deployment Steps
-
Restart BOSA Server:
# Stop BOSA server (Ctrl+C) # Then restart cd D:\dev\projects\BOSA bosa serve -
Verify Installation:
- Check BOSA logs for app loading
- Access the app:
http://localhost:3000/bp_wb/ - Verify sidebar link appears for Super Admin users
-
Check App Status:
bosa psShould show
bp_wbin the list of running apps.
Manual Deployment
If you prefer to deploy manually:
-
Build frontend:
npm run build:frontend -
Copy files to BOSA apps directory:
xcopy /E /I /Y "D:\dev\projects\BOSA Plugins\wb\*" "D:\dev\projects\BOSA\apps\bp_wb\" -
Exclude development files:
- Don't copy
node_modules/ - Don't copy
.git/ - Don't copy
*.test.tsor*.test.tsx - Don't copy development config files
- Don't copy
-
Install dependencies:
cd D:\dev\projects\BOSA\apps\bp_wb npm install --production
Troubleshooting
App Not Loading
- Check BOSA logs for errors
- Verify
manifest.yamlis valid YAML - Check that
server.jsexists and is executable - Verify Node.js is installed and in PATH
Sidebar Link Not Appearing
- Verify you're logged in as Super Admin
- Check that
sidebar.jsonexists in app directory - Verify BOSA is reading sidebar configuration from apps
- Check browser console for errors
API Routes Not Working
- Verify backend server is running (check
bosa ps) - Check that BOSA SDK is properly initialized
- Verify database migrations have run
- Check BOSA logs for API errors
Production Deployment
For production deployment:
- Update paths in
deploy_wb.batto match production paths - Ensure production build is optimized:
npm run build - Copy to production BOSA instance
- Restart BOSA server
- Verify app is accessible
Updating the App
To update an existing deployment:
- Make changes in development directory
- Run deployment script again (it will overwrite existing files)
- Restart BOSA server to load changes
Note: For Node.js apps, you may need to restart the app process or the entire BOSA server for changes to take effect.