Agora catalog ui is a single page front-end application built with react (and create-react-app tool) that displays a catalog of provider and resource information published publicly on an agora api endpoint.
In ./src/config.js
there are some basic configuration properties to be set before producing the optimized build. The properties that can be set are as follows:
logo: "default"
Option to use the default or a custom logo for agora catalog navbar brandingbrand: "agora service catalog"
Option to specify a brand title for the specific agora catalog instanceendpoint: "demo.agora.grnet.gr"
Option to specify a public agora api to retrieve published results fromcolorA:"#9c6078"
Option to specify a primary color for theme-ingcolorB:"#112130"
Option to specify a secondary color for theme-ingbasePath: "/catalog"
Optional parameter to specify a subfolder path where the web app will be hosted. If defined here set also accordingly the homepage parameter at package.jsonorganisationUUID: "<organisationUUID>"
Optional parameter to show ONLY resources that the specified organisation provides. In the providers section also affiliated providers are presented.
Steps to build and deploy the app:
- git clone this repo
- Issue
npm install
- Configure parameters in
./src/build
- Issue
npm run build
- Deploy contents of the
./build/
folder to the remote webserver
If the app is meant to be deployed directly in a remote node such as https://demo.agora.grnet.gr make sure that:
- basePath parameter is omitted in
./src/config.js
file - homepage parameter is omitted in
package.json
file - Issue
npm run build
- Deploy contents of the
./build/
folder to the corresponding document root folder of the remote webserver
Deploy on a specific subfolder - for example under https://demo.agora.grnet.gr/catalog
If the app is meant to be deployed under a subfolder on the remote node make sure that:
- basePath parameter (in
./src/config.js
) is set to the subfolder value ~ for eg.basePath: "/catalog"
- homepage parameter (in
package.json
) is set to the correct domain/path value ~ for eg. "homepage":"https://demo.agora.grnet.gr/catalog" - Issue
npm run build
- Deploy contents of the
./build/
folder to the correspodning subfolder on the remote webserver
Steps to configure apache:
- Deploy optimized build to a folder such as
/srv/agora/catalog
- Use an apache Alias such as the following:
Alias /catalog /srv/agora/catalog
- Use an apache Directory configuration directive such as
<Directory "/srv/agora/catalog">
Order deny,allow
Allow from all
Require all granted
RewriteEngine on
# Don't rewrite files or directories
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^ - [L]
# Rewrite everything else to index.html to allow html5 state links
RewriteRule ^ /catalog/index.html [L]
</Directory>