Variables
The Variables page, which lists and edits the variables of each environment and sets the ones AntelopeJS Cloud can decide.
The Variables page lists, for each environment of the project, the variables its services hold and the ones they lack.
What is listed
The page lists a variable a resource wires, one the owner set, plain or secret, and a missing one. A secret is write-only. AntelopeJS Cloud never sends its value back, and no answer of the page carries one.
What is missing
In an environment without a dashboard, a missing variable is an envOverrides key of the running project's antelope.config.ts that no service holds.
In an environment that runs a dashboard, the page tells it per service:
- An
envOverrideskey the app lacks, whatever the dashboard holds. - Each variable a dashboard cannot start without that the dashboard lacks:
DMS_API_BASE_URL,DMS_CLIENT_BASE_URL,DMS_SESSION_SECRETandDMS_BOOTSTRAP_SECRET.
The row names the service, and Set value sets the variable there.
What AntelopeJS Cloud can decide
For an environment that runs one app service, the banner offers one action per environment: Set N values on the environment. A dialog first lists each variable the action sets, on which service, and each missing one it leaves, with the reason. The action decides from the config path an envOverrides key feeds, by the npm package of the module:
- The app's address, for
publicBaseUrlof@antelopejs/apiand for the dashboard'sDMS_API_BASE_URL. - The dashboard's address, for
clientBaseUrlof@antelopejs/dmsand for the dashboard'sDMS_CLIENT_BASE_URL. X-Client-IP, the header that the gateway of AntelopeJS Cloud overwrites with the client's address, forauth.clientIpHeaderof@antelopejs/dmsand for the dashboard'sDMS_CLIENT_IP_HEADER.- A generated secret for each signing secret the project owns:
auth.jwtSecretandhtmlRender.serviceSecretof@antelopejs/dms,secretof@antelopejs/auth-jwt, and the dashboard'sDMS_SESSION_SECRET. - One generated secret, the same on both services, for
frontend.bootstrapSecretof@antelopejs/dmson the app andDMS_BOOTSTRAP_SECRETon the dashboard. DMS_SETUP_TOKENon the app of a project that loads@antelopejs/dms. The first owner of the deployed instance registers with this token.
What it leaves
The action leaves everything else: an SMTP password, a storage path, a database name, an API key of another service, whatever its name. A database's connection string is left to the Resources page. An address is left while the service it names has none.
Nobody can read a secret back, so the shared secret is generated for the app and the dashboard together or not at all. It stays with the owner when one of them holds it, when the dashboard does not run yet, or when no envOverrides entry hands it to the app.
What it never does
The action replaces no value a service holds. It computes the plan again when it runs, from what the services hold then.
It sets nothing for the module itself. The deployed instance does not run this module, so no service gets ANTELOPE_CLOUD_SECRET_KEY.
The secrets
Each secret is 32 random bytes from crypto.randomBytes, in hex. The DMS backend generates it when the action runs and sends it to AntelopeJS Cloud as a secret variable. The module does not log it, store it, nor answer it, with one exception: the answer of the action that generated the setup token carries that token, once, and the page copies it to the clipboard. No later answer has it. An owner who lost it removes DMS_SETUP_TOKEN and runs the action again.
When AntelopeJS Cloud refuses the shared secret on one of the two services, the action takes it back from the other.