👋 Hello,
Thanks for the question, that part could be a bit more clear. The variables outlined on that page aren’t expressed directly, but rather are available for templating into environment variables you specify. This allows you to use these values in variable names your app already expects, and also allows you to format the variables as needed.
To set environment variables, go to the “Components” tab of your app, scroll to “Environment Variables”, and click “Edit”. In the key, you can specify the name of any environment variable needed by your application. In the value you can specify a template which optionally includes the variables outlined in the “How to use environment variables” page.
For example, I could put “SITE_ADDRESS
” in the key section, and “${APP_DOMAIN}
” in the value section and my app would set would show something like SITE_ADDRESS=example-app-000000.ondigitalocean.app
. You can also build more complex variables, like database connection strings which reference components by name, for example key “API_SERVICE_ADDRESS
”, value “http://${api.PRIVATE_DOMAIN}:${api.PRIVATE_PORT}/api
” might yield something like “API_SERVICE_ADDRESS=http://api:80/api
”. For your APP_URL
example, you would simply create a variable with key “APP_URL
” and value “${APP_URL}
” to yield API_SERVICE_ADDRESS=https://example-app-000000.ondigitalocean.app
.