kemicofaK
Deno5mo ago
kemicofa

Unable to access injected env variables like PGHOST from connected Postgres Database

edit: seems more appropriate to add it to #deploy-ea

After reading the documentation, my understanding is that there are environment variables from my connected database that are injected automatically.

I'm attempting to run a migration command with drizzle during the build step (I've set a "Build command" in my app's configuration in the dashboard).. however it appears that these environment variables are undefined, looking at my failed builds.

deno -A --node-modules-dir npm:drizzle-kit migrate


I also read that some environment variables may not necessarily be accessible during the build step.. is this what's happening? How can I run this command successfully? Thanks
Screenshot_2025-09-06_at_23.28.39.png
Was this page helpful?