Admin UI host¶
Deploy the admin UI as a static SPA on a static host. This package is not part of the Hub runtime.
| Piece | Maintainer dogfood |
|---|---|
| Host | cPanel shared hosting (Apache / LiteSpeed) |
| Public UI | https://rbac.mnfprofile.com |
| API (cross-origin) | https://rbac-api.mnfprofile.com |
| Build | GitHub Actions on v* release tags + manual workflow_dispatch |
| Serve | Static dist/ + SPA .htaccess (not Node.js on cPanel) |
Contents¶
| Artifact | Purpose |
|---|---|
| cPanel setup | Subdomain, docroot, secrets, first deploy |
.github/workflows/admin-ui-cpanel-deploy.yml |
Named jobs: build → upload → smoke |
react-frontend/public/.htaccess |
Copied into dist/ for SPA route fallback |
Quick mental model¶
Browser → https://rbac.mnfprofile.com (Admin UI host, static)
→ https://rbac-api.mnfprofile.com (Hub runtime API, CORS + cookies)
Build-time env (dogfood):
On the Hub runtime host, set at least:
FRONTEND_URL=https://rbac.mnfprofile.com
EMAIL_VERIFICATION_URL=https://rbac.mnfprofile.com/verify-email
PASSWORD_RESET_URL=https://rbac.mnfprofile.com/reset-password
BACKEND_CORS_ORIGINS=["https://rbac.mnfprofile.com"]
Then recreate/restart the API container so CORS and email links pick up the new values.
Adopter options (secondary)¶
- Any static host (Vercel, Cloudflare Pages, Netlify, other cPanel): same build env + CORS/FRONTEND_URL on your API.
- Hub image
mnaimfaizy/fastapi-rbac-frontend: nginx container with same-origin/apiproxy — use when you want UI next to the API in Compose/k8s, not the default Admin UI host path.
Related¶
- ADR: 0004 — Admin UI host on cPanel
- Hub runtime: index · env.example
- React deployment notes: frontend/react/deployment.md