Skip to main content
New GCN Circulars features for September 2023! See news and announcements

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.

KeyDescriptionDefault
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_EMAILZendesk API token and user email addressZendesk API disabled
ADS_TOKEN

Astrophysics Data System (ADS) API token

ADS disabled
GCN_FEATURES

Feature flags (for example, ANTIGRAVITY,TIME_TRAVEL,PYROKINESIS)

No features
Looking for U.S. government information and services? Visit USA.gov