I was looking at the environment variables for an App I created in the App Platform with a PostgreSQL database and that the
DATABASE_URL is available during build time:
Your component will have access to these variables at both build time and runtime.
However, when trying to access it during the build it wasn’t available. I also downloaded the YAML spec for the app where the scope was set to
Is there a way to configure
DATABASE_URL to be available during build time via the UI?
The only way I can think of doing this is downloading the spec, updating the scope, and then updating the app with the doctl.
Besides that, could the availability of the DATABASE_URL env var be better clarified in the UI to avoid confusion?
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!
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.
Click below to sign up and get $100 of credit to try our products over 60 days!