railway run - DATABASE_URL vs DATABASE_PUBLIC_URL

Wondering if this is a bug. I've got a rails app deployed and it's using DATABASE_URL and it all works (migrations, jobs, etc). If I then use:
railway run bash
railway run bash
I look at
printenv
printenv
And I see DATABASE_URL set to the internal value. However if I run
rails c
User.count
rails c
User.count
it times out and can't reach postgres. If instead, I run:
DATABASE_URL=<PUBLIC_URL> rails c
User.count
DATABASE_URL=<PUBLIC_URL> rails c
User.count
it works. So i'm wondering why railway run isn't in the private network?
Solution:
please know that railway run, runs the commands locally
Jump to solution
4 Replies
Percy
Percy2mo ago
Project ID: 366ad74c-a280-40ef-bebb-04ef72d94ee4
Anthony Ross
Anthony RossOP2mo ago
project id: 366ad74c-a280-40ef-bebb-04ef72d94ee4
Solution
Brody
Brody2mo ago
please know that railway run, runs the commands locally
Anthony Ross
Anthony RossOP2mo ago
ah, that explains it
Want results from more Discord servers?
Add your server