Skip to content

Latest commit

 

History

History
53 lines (34 loc) · 2.79 KB

Configuration.md

File metadata and controls

53 lines (34 loc) · 2.79 KB

Configuration

You'll find configurable options for the application here. We use environment variables for this purpose.

Options

  • REACT_APP_COMMUNITY - URI of the community
  • REACT_APP_COMMUNITY_CONTAINER - name of folder in which to store person's data of this community
  • REACT_APP_EMAIL_NOTIFICATIONS_SERVICE - server providing email notifications service along the lines of solid-email-notifications; provide base url without trailing slash; notifications will be disabled if left empty
  • REACT_APP_EMAIL_NOTIFICATIONS_IDENTITY - identity of the email notifications service; app will allow this identity to read person's inbox
  • default CreateReactApp options
  • BASE_URL - this is base url for ClientID in ./public/clientid.jsonld, it's disabled in development environment by default (dynamic clientID is used), defaults to http://localhost:3000 in development, and https://sleepy.bike for build
  • REACT_APP_ENABLE_DEV_CLIENT_ID - enable static ClientID in development environment (see also BASE_URL option). If you set this option, you'll only be able to sign in with Solid Pod running on localhost! (dynamic clientID will be used by default)

Usage

Note: You can also specify environment variables in .env files

Run

REACT_APP_VARIABLE1="variable" REACT_APP_VARIABLE_2="other variable" yarn start

Build

REACT_APP_VARIABLE1="variable" REACT_APP_VARIABLE_2="other variable" yarn build

Specify environment variables for github workflow build

You can specify github environment variables in repository's settings. Some of github variables are named differently from the environment variables documented here

Have a look in deployment workflow to see how our github environment variables map to our app configuration options

Github workflow variables

  • COMMUNITY
  • COMMUNITY_CONTAINER
  • EMAIL_NOTIFICATIONS_SERVICE
  • EMAIL_NOTIFICATIONS_IDENTITY
  • see deployment workflow for more

Adding a new option

New configuration options make things more flexible 👍

Custom configuration options need to start with REACT_APP_.

Add the new option in src/config/index.ts, and include some sensible default, so the app can still run without specifying anything

Make sure to also include the option in deployment workflow