Configuration
For both local development and deployment, the configuration of the GCN web application is controlled by the environment variables. You can adjust the environment variables in any one of three ways:
-
.env
file: Create a file called.env
in the base directory of your project formatted like this:FOO=value_of_foo_for_local_testing BAR=value_of_bar_for_local_testing
-
preferences.arc
file: Create a file called.preferences.arc
in the base directory of your project formatted like this:@env testing FOO=value_of_foo_for_local_testing BAR=value_of_bar_for_local_testing production FOO=value_of_foo_for_deployment BAR=value_of_bar_for_deployment
-
arc env
command: Adjust settings for production by running the following commands.arc env -e production --add FOO value_of_foo_for_deployment arc env -e production --add BAR value_of_bar_for_deployment
Supported environment variables
All environment variables are optional in local development. All environment variables with the exception of GCN_FEATURES
are required in production deployment.
Key | Description | Default |
---|---|---|
SESSION_SECRET | Signing key for session cookies. Should be a long, random string | Hard-coded constant |
COGNITO_USER_POOL_ID , OIDC_CLIENT_ID , OIDC_CLIENT_SECRET | OpenID Connect identity provider configuration for AWS Cognito | Sandbox identity provider |
RECAPTCHA_SITE_KEY , RECAPTCHA_SECRET_KEY | Google ReCAPTCHA configuration | ReCAPTCHAs replaced with placeholder |
GITHUB_API_TOKEN | GitHub API token for the schema browser. In GitHub settings, generate a Classic token with the expiration as long as possible and no scopes selected | Anonymous GitHub API requests with lower rate limits |
ORIGIN | URL origin for external redirects, email From addresses, etc. | http://localhost:3333 |
ZENDESK_EMAIL | Email address for Zendesk forwarding | Forwarding disabled |
ZENDESK_TOKEN , ZENDESK_TOKEN_EMAIL | Zendesk API token and user email address | Zendesk API disabled |
ADS_TOKEN | Astrophysics Data System (ADS) API token | ADS disabled |
GCN_FEATURES | Feature flags (for example,
| No features |