Skip to content

Environment variables

Guido Vilariño edited this page Jun 11, 2014 · 18 revisions

In order to run DemocracyOS, some environment settings are needed. As described in the Environments and config files wiki page, variables are defined in a JSON config file; different settings can be seen in the config/sample.json file, included in the codebase.

Alternatively, settings are obtained from your OS's environment variables.

Note: the following line should be added to the PATH variable: bin:node_modules/.bin:/usr/local/bin:/usr/bin:/bin

  • FAVICON: URL to app's favicon
  • HOST: public accessible URL to your app. Used as base for internal URL building.
  • LEARN_MORE_URL: if set, an alert will show with this URL as a target for learning more about your deployment.
  • LOCALE: application i18n locale. Check here for available language files.
  • LOGO: URL to the top-left icon for your deployment
  • MANDRILL_APIKEY: your Mandrill API key
  • MANDRILL_FROM_EMAIL: registration email sender's name (e.g.: no-reply@democracyos.org)
  • MANDRILL_FROM_NAME: registration email sender's name
  • MANDRILL_USERNAME: your@email.com
  • MONGO_URL: full URL to your MongoDB storage solution
  • NODE_ENV: development - name of the running environment. Learn more here
  • NODE_PATH: path to the home of the running code. If running node from the project's home dir, then set to .
  • ORGANIZATION_NAME: Name of your organization.
  • ORGANIZATION_URL: URL to your organization's website.
  • PROTOCOL: http/https which base protocol is to be considered when building application URLs. Usually http.
  • PUBLIC_PORT: port where the application is listening. If left empty (but defined), it will default to 80.
  • RSS_ENABLED: true/false - Whether the /rss route is enabled for notifying new laws being added to the platform.
  • STAFF: emails whose users are allowed to acces the administration module. For multiple users, separate emails by comas (e.g.: "peter@server.com,jane@something.org")
  • COMMENTS_PER_PAGE: number of arguments (i.e.: comments) per page. 0 means no paging.

The following environment settings are optional:

  • 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

Introduced on DemocracyOS v0.7.0, more optional environment settings:

  • FAQ_ENABLED: true or false
  • TERMS_OF_SERVICE_ENABLED: true or false
  • PRIVACY_POLICY_ENABLED: true or false
  • GLOSSARY_ENABLED: true or false

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).