R
Railway8mo 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
Percy8mo ago
Project ID: e421520a-200c-4fe1-843f-c8308f0813fc
milo
milo8mo ago
can i ask what you are doing at buildtime with sqlx @alex
Solution
Brody
Brody8mo 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
alex8mo ago
Normal sqlx macro query validation If pn isn’t available at build then that’s fine
milo
milo8mo 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
alex8mo ago
Oh
milo
milo8mo ago
that’s what i do atleast, and im happy w it
alex
alex8mo ago
Ok I’ll see
Brody
Brody8mo ago
soon ™️ (soon = at some point)
alex
alex8mo ago
Wait how do I mark it as correct
Brody
Brody8mo ago
you dont have perms
alex
alex8mo ago
It’s my own stupid thread
Brody
Brody8mo ago
you can't be trusted
alex
alex8mo ago
Bro what
Want results from more Discord servers?
Add your server