R
Railway9mo ago
alex

[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:
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
Jump to solution
14 Replies
Percy
Percy9mo ago
Project ID: e421520a-200c-4fe1-843f-c8308f0813fc
milo
milo9mo ago
can i ask what you are doing at buildtime with sqlx @alex
Solution
Brody
Brody9mo ago
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
alex
alexOP9mo ago
Normal sqlx macro query validation If pn isn’t available at build then that’s fine
milo
milo9mo ago
I recommend not using the macros, im pretty sure they are vulnerable to some sort of attack, i would just use the functions
alex
alexOP9mo ago
Oh
milo
milo9mo ago
that’s what i do atleast, and im happy w it
alex
alexOP9mo ago
Ok I’ll see
Brody
Brody9mo ago
soon ™️ (soon = at some point)
alex
alexOP9mo ago
Wait how do I mark it as correct
Brody
Brody9mo ago
you dont have perms
alex
alexOP9mo ago
It’s my own stupid thread
Brody
Brody9mo ago
you can't be trusted
alex
alexOP9mo ago
Bro what
Want results from more Discord servers?
Add your server