Environment Variables
Set variables when you add a service, or later under the service's Variable tab. Changes apply on the next deployment.
Raw editing
Click Edit Raw Variables to paste .env-style lines:
sh
NODE_ENV=production
API_URL="https://api.example.com"
# comments and blank lines are ignoredBuilt-in variables
Every service gets these, which you can reference in your own values with ${NAME}:
| Variable | Value |
|---|---|
PORT | The service's first port |
<PORT>_PORT | Each port by its name, such as WEB_PORT |
ZENAVO_<PORT>_DOMAIN | The domain bound to that port, such as ZENAVO_WEB_DOMAIN |
ZENAVO_<PORT>_URL | https:// plus that domain |
CONTAINER_HOSTNAME | The service name |
Sharing between services
A service can expose some of its variables to the rest of the project; databases do this for their connection details (Databases). Other services then reference them as ${NAME}.
Generated passwords
${PASSWORD} in a template becomes a random password the first time the project is saved, and stays the same afterwards.
Secrets
Variable values are encrypted at rest, hidden from team viewers, and redacted from build and runtime logs.