vtadmin-web

Environment Variables #

These environment variables configure VTAdmin, most commonly when creating a vtadmin-web production build as described in the VTAdmin Operator's Guide. These environment variables also enumerated in web/vtadmin/src/react-app-env.d.ts.

Under the hood, vtadmin-web uses create-react-app, which requires all environment variables to be prefixed with REACT_APP to avoid accidentally including secrets in the static build. For more on custom environment variables with create-react-app, see "Adding Custom Environment Variables".

These environment variables can be passed inline to the npm run build command or added to a .env file.

NameRequiredTypeDefaultDefinition
REACT_APP_VTADMIN_API_ADDRESSRequiredstring-The full address of vtadmin-api's HTTP(S) interface. Example: "https://vtadmin.example.com:12345"
REACT_APP_BUGSNAG_API_KEYOptionalstring-An API key for https://bugsnag.com. If defined, the @bugsnag/js client will be initialized. Your Bugsnag API key can be found in your Bugsnag Project Settings.
REACT_APP_BUILD_BRANCHOptionalstring-The branch vtadmin-web was built with. Used only for debugging; will appear on the (secret) /settings route in the UI.
REACT_APP_BUILD_SHAOptionalstring-The SHA vtadmin-web was built with. Used only for debugging; will appear on the (secret) /settings route in the UI.
REACT_APP_DOCUMENT_TITLEOptionalstring"VTAdmin"Used for the document.title property. Overriding this can be useful to differentiate between multiple VTAdmin deployments, e.g., "VTAdmin (staging)".
REACT_APP_ENABLE_EXPERIMENTAL_TABLET_DEBUG_VARSOptionalstring-Optional, but recommended. When "true", enables front-end components that query vtadmin-api's /api/experimental/tablet/{tablet}/debug/vars endpoint.
REACT_APP_FETCH_CREDENTIALSOptionalstring-Configures the credentials property for fetch requests made against vtadmin-api. If unspecified, uses fetch defaults. See https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API/Using_Fetch#sending_a_request_with_credentials_included
REACT_APP_READONLY_MODEOptionalstring"false"If "true", UI controls that correspond to write actions (PUT, POST, DELETE) will be hidden. Note that this only affects the UI. If write actions are a concern, Vitess operators are encouraged to also configure vtadmin-api for role-based access control (RBAC) if needed.