-
Notifications
You must be signed in to change notification settings - Fork 617
Environment variables
In order to run DemocracyOS, some config settings are needed. These settings can be defined either as a JSON file (as described in the Environments and config files wiki page) following the config/defaults.json, or through environment variables. For the latter case, you should consider the following:
DemocracyOS will not run if any of these settings aren't set.
-
NODE_ENV: name of the running environment. Learn more [here] (https://github.com/DemocracyOS/app/wiki/Environments-and-config-files) - Defaults todevelopment. -
NODE_PATH: path to the home of the running code. If runningnodefrom the project's home dir, then set to. -
HOST: public accessible URL to your app. Used as base for internal URL building. -
PROTOCOL: base protocol to be considered when building application URLs.httporhttpsfor SSL-enabled servers. -
PUBLIC_PORT: port to be considered when building application URLs. -
PORT: port where the application is listening. -
LOCALE: application i18n locale. Check here for available language files. -
MONGO_URL: full URL to your MongoDB storage solution. -
NOTIFICATIONS_URL: URL to your notifier notifications server. -
NOTIFICATIONS_TOKEN: API token for thenotifier. -
FAVICON: URL to app's favicon -
LOGO: URL to the top-left icon for your deployment -
ORGANIZATION_NAME: Name of your organization. -
ORGANIZATION_URL: URL to your organization's website. -
STAFF: emails whose users are allowed to acces the administration module. For multiple users, separate emails by comas (e.g.:"[email protected],[email protected]"). Please note that this does not create accounts for the given emails in DemocracyOS; admins should signup the same way as other users do before being able to access the admin module. -
RSS_ENABLED: true/false - Whether the/rssroute is enabled for notifying newlaws being added to the platform. -
COMMENTS_PER_PAGE: number of arguments (i.e.: comments) per page.0means no paging. -
JWT_SECRET: a string to be used as secret for signing the app's Jason Web Tokens
If you don't define these as environment variables, you'll need to define this in your ~/.netrc file. More about this here
-
GITHUB_USERNAME: GitHub username for created token. (Create your token on https://github.com/settings/tokens/new) -
GITHUB_PASSWORD: GitHub app token.
The following environment settings are optional:
-
HTTPS_PORTandHTTPS_REDIRECT: port where theHTTPSenabled server should listen and redirections strategy forHTTPtoHTTPSredirection, respectively. Read our HTTPS wiki page for more information on this. -
AUTH_BASIC_USERNAMEandAUTH_BASIC_PASSWORD: username and password for protecting your deployment through Basic Auth -
MONGO_USERS_URL: if you would like your users to be stored in a separate database than the rest of your data, then specify the URL here. -
LEARN_MORE_URL: if set, an alert will show with this URL as a target for learning more about your deployment. -
SOCIALSHARE_DOMAIN: domain for social network sharing. -
SOCIALSHARE_IMAGE: URL to the social network card thumbnail. 200x200 px recommended. -
SOCIALSHARE_SITE_DESCRIPTION: description for social network card. -
SOCIALSHARE_SITE_NAME: site name for social network card. -
SOCIALSHARE_TWITTER_USERNAME: twitter handle to redirect to when sharing in twitter -
FAQ:trueorfalse -
TERMS_OF_SERVICE:trueorfalse -
PRIVACY_POLICY:trueorfalse -
GLOSSARY:trueorfalse
These are used to show (or not) a help page on each topic based on faq.md, tos.md and pp.md files located on each help-* component respectively (help-faq, help-tos and help-pp).
Before v0.7.4 these environment variables where named FAQ_ENABLED, TERMS_OF_SERVICE_ENABLED, PRIVACY_POLICY_ENABLED, GLOSSARY_ENABLED.
Visit our official website - Developed by Democracia en Red and contributors from the world over!