Skip to content

App environment variables

To Huynh edited this page Jan 25, 2023 · 9 revisions

Environment variables

  • NEXTAUTH_URL: The canonical URL of the app. https://next-auth.js.org/configuration/options#nextauth_url
  • SECRET: A random string is used to hash tokens, sign/encrypt cookies and generate cryptographic keys. https://next-auth.js.org/configuration/options#secret
  • DATAVERSE_SERVER_URL: The base URL of the Dataverse API.
  • DATAVERSE_SITE_URL: The base URL of the Dataverse website.
  • HYPOTHESIS_SERVER_URL: The base URL of the Hypothes.is API.
  • ARCORE_SERVER_URL: The base URL of the ARCore API, with a port number.
  • HYPOTHESIS_ATI_STAGING_GROUP_ID: The id of the ATI_STAGING Hypothes.is group.
  • ADMIN_HYPOTHESIS_API_TOKEN: The Hypothesis API token for the QDR author.
  • NEXT_PUBLIC_MATOMO_URL: The Matomo URL
  • NEXT_PUBLIC_MATOMO_SITE_ID: The Matomo Site ID

Local Development

Create a file .env.local in the root directory of the project with the following environment variables:

Production Deployment

  • NEXTAUTH_URL=https://anno-rep.org
  • SECRET=<any long string>
  • DATAVERSE_SERVER_URL=accessible-qdr-dataverse-url
  • DATAVERSE_SITE_URL=accessible-qdr-site-url
  • HYPOTHESIS_SERVER_URL=https://api.hypothes.is
  • ARCORE_SERVER_URL=arcore-server-url
  • HYPOTHESIS_ATI_STAGING_GROUP_ID=AKxYR7nd
  • ADMIN_HYPOTHESIS_API_TOKEN=<admin-hypothesis-api-token>
  • NEXT_PUBLIC_MATOMO_URL=https://analytics.qdr.syr.edu
  • NEXT_PUBLIC_MATOMO_SITE_ID=4

Notes on deploying with environment variables

  • All environment variables that starts NEXT_PUBLIC should be set prior to the build step in the deployment process. Relevant line of code

Clone this wiki locally