Skip to content

Latest commit

 

History

History
46 lines (30 loc) · 3.33 KB

setup.md

File metadata and controls

46 lines (30 loc) · 3.33 KB

TermIt UI Setup Guide

This guide provides information on how to build and deploy TermIt UI.

Build

System Requirements

  • NodeJS 12.x or later
  • npm 6.x or later

Setup

To build TermIt for non-development deployment, use the build-prod npm script.

The following parameters can be configured for the build:

Parameter Type Default Description
REACT_APP_SERVER_URL string - Specifies the URL where the TermIt backend is running
REACT_APP_DEPLOYMENT_NAME string '' Is used to disambiguate cookies and items in the local storage in case the client accesses multiple TermIt instances
REACT_APP_ADMIN_REGISTRATION_ONLY boolean false Configures whether the login page should contain a link to registration or not. If the parameter is true, only administrators can add new users and there is no registration link
REACT_APP_SHOW_PUBLIC_VIEW_ON_UNAUTHORIZED boolean false Configures whether the application should show the public view dashboard if the user is not logged in. By default, the login screen is shown.
REACT_APP_AUTHENTICATION string '' Authentication means. Use oidc to set up an OIDC sevice-based authentication such as Keycloak (must be configured on backend as well).
REACT_APP_AUTH_SERVER_URL string '' URL of the OIDC authentication service (including Realm identification, if relevant). Relevant only if OIDC-based authentication is enabled.
REACT_APP_AUTH_CLIENT_ID string '' Client identifier of this appliation. Relevant only if OIDC-based authentication is enabled.

Example

  1. npm install
  2. REACT_APP_SERVER_URL=https://kbss.felk.cvut.cz/termit-server-dev REACT_APP_DEPLOYMENT_NAME=dev REACT_APP_ADMIN_REGISTRATION_ONLY=true npm run build-prod

Deployment

Deployment is fairly simple, just take the content of the build folder generated by the build script and copy it to a location accessible via HTTP(S), e.g., into an Apache HTTP server-managed location.

Example

cp -R build /var/www/termit/

Authentication

TermIt can operate in one of two authentication modes - using its internal user database and authentication means (default) or via an OIDC authentication service such as Keycloak. Corresponding parameters (service URL, clientId) need to be set up (see the table above for the relevant parameters and explanation).