according to https://www.digitalocean.com/docs/app-platform/how-to/use-environment-variables/, I should have access to the APP_URL in the system environments
In my service component, when I do set, there’s no APP_URL in the list of system envs.
Where is it?
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
👋 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.
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.