[Rust] [Sqlx] [Networking] Using DATABASE_URL=${DATABASE_PRIVATE_URL} in Railway at build time fails
Changing to DATABASE_URL=${DATABASE_URL} fixes it. I believe it has something to do with resolving names inside the build container.
Solution:Jump to solution
I'd like to note that the private network is not available during build, I assume sqlx is connecting to the database for some reason or another during build. I shall leave the rest to milo
14 Replies
Project ID:
e421520a-200c-4fe1-843f-c8308f0813fc
can i ask what you are doing at buildtime with sqlx @alex
Solution
I'd like to note that the private network is not available during build, I assume sqlx is connecting to the database for some reason or another during build. I shall leave the rest to milo
Normal sqlx macro query validation
If pn isn’t available at build then that’s fine
I recommend not using the macros, im pretty sure they are vulnerable to some sort of attack, i would just use the functions
Oh
that’s what i do atleast, and im happy w it
Ok I’ll see
soon ™️ (soon = at some point)
Wait how do I mark it as correct
you dont have perms
It’s my own stupid thread
you can't be trusted
Bro what