-
Notifications
You must be signed in to change notification settings - Fork 6
Deploying Custom html pages and images
Sunbird supports configuration of multiple tenants (or channels) in a single instance. Each tenant can deploy their custom home page, logo and favicon to be displayed in portal and mobile app for users of that tenant.
- Create a folder for each tenant. The folder should have the channel name of the tenant as the folder name.
- Custom html and images of the tenant should be copied to the above folder as per the below specifications:
- The home page html file should be named "index.html". All the dependent files (like js, css and images) used by the home page should be either
- within the package and referred using relative paths from "index.html"
- or hosted in a CDN and referred by the full CDN URL from the html files
- The logo of the tenant should be with the name "logo.png"
- Optionally, tenants can also configure the following:
- an icon (to be displayed as browser favicon) which should be named as "favicon.ico"
- poster image (to be used as flash screen in the mobile app) which should be named as "poster.png"
- The home page html file should be named "index.html". All the dependent files (like js, css and images) used by the home page should be either
The above package should be placed inside a folder named tenant
. Find below example package structure of tenant (sunbird_1
is the channel name of the tenant) specific custom home page and images:
If sunbird portal is deployed using docker, the custom package of the tenant (e.g. sunbird_1) should be copied to a extensions folder (e.g. /data/extensions/tenant) on the docker swarm nodes and the volume should be mounted on the docker container. Please refer this wiki for instructions on configuring the mount volume.
If running the sunbird portal as node.js application directly on the VM, the package (e.g. sunbird_1
folder) should be copied to <app>/tenant
folder.
Once the sunbird services are set up, navigate to https://sunbird.example.com/sunbird_1 (Assuming you've set up sunbird on sunbird.example.com) to access the custom home page.
By changing sunbird_default_tenant
variable in environment to sunbird_1
this tenant becomes default home page and on opening url (example : http://www.sunbird.org) it will open sunbird_1 as home page without adding /sunbird_1 at the end of the url.