I am trying to connect the Database on the App Platform and I don’t see anything happened. Connection is not successful.
Env Vars Not Recognized
Description: I have an App Spec:
databases:
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,
Got to know the below points.
Currently, DATABASE_URL (or any other database bind variables) is not available during build. We plan on supporting build time access to databases soon though we don’t have any ETA. I apologize for the inconvenience caused!
Please change the scope of the Database variables to
databases:
- engine: PG
name: db
num_nodes: 1
size: db-s-dev-database
version: "12"
name: portal
region: nyc
services:
- dockerfile_path: Dockerfile
envs:
- key: DATABASE_URL
scope: RUN_TIME
value: ${db.JDBC_DATABASE_URL}
- key: DATABASE_USERNAME
scope: RUN_TIME
value: ${db.USERNAME}
- key: DATABASE_PASSWORD
scope: RUN_TIME
value: ${db.PASSWORD}
This should work! Hope this helps!
Cheers, Sri Charan
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.