R
Railway•15mo ago
drdrigg

How to select region?

I want to use Europe instead of US. I have a PRO account and is a beta tester. Build log says: [Region: us-west1] Variable in the service is: RAILWAY_REGION europe-west4
82 Replies
Percy
Percy•15mo ago
Project ID: 988851b6-78d5-44de-a73d-3e5b6468c8bf
drdrigg
drdriggOP•15mo ago
988851b6-78d5-44de-a73d-3e5b6468c8bf Project ID: 988851b6-78d5-44de-a73d-3e5b6468c8bf
Medim
Medim•15mo ago
U don't seem to have the Priority Board cargo here in the Discord Maybe that's why? Try doing /beta again And is your discord account linked properly in the railway settings? (I may be wrong tho)
Percy
Percy•15mo ago
Something went wrong. Please try again.
drdrigg
drdriggOP•15mo ago
I get "Something went wrong. Please try again." But I got it working. But I found no way to change region for my Postgres database so having the servers in the EU and the database in the US just made everything even slower (3 sec instead of 280 ms) 🙂
Brody
Brody•15mo ago
fun fact we can all see that something went wrong message
Medim
Medim•15mo ago
yeah, i've seen a lot of that message lately is it a bug or sumthin?
Brody
Brody•15mo ago
yeah you can't change the region for the database plugins, the system those plugins rely on is different than the system regular services use and will soon be deprecated so there was no use in backporting private networking and regions to a system that would be getting deprecated. the solution being, use this official postgres template, you'd set region in the service variables like you would any other service https://railway.app/template/postgres Percy is misbehaving
drdrigg
drdriggOP•15mo ago
Yes because now the admin panel says I am not part of the beta all though the checkmark says I am 🙂 When I add the region variable there is a popup saying I must be part of priority onboarding (which I assume I am)
Medim
Medim•15mo ago
u just got the discord role, try again
Brody
Brody•15mo ago
I gave them that
Percy
Percy•15mo ago
Something went wrong. Please try again.
Brody
Brody•15mo ago
the railway dashboard says their beta, if the popup is getting in the way you can use the raw environment variable editor to set the region variable are you services still not deploying to your set region?
drdrigg
drdriggOP•15mo ago
The admin panel says this
No description
drdrigg
drdriggOP•15mo ago
I will try to deploy
Brody
Brody•15mo ago
please try this
drdrigg
drdriggOP•15mo ago
I add the variable and get this
No description
drdrigg
drdriggOP•15mo ago
Tried pressing on both Will deploy now
Brody
Brody•15mo ago
did you use the raw editor
drdrigg
drdriggOP•15mo ago
No, "new variable" but it seems to deploy to right region but I have a redis server connected to this, will it also use Europe?
No description
drdrigg
drdriggOP•15mo ago
BTW, I am trying this project now: 2a996a89-6751-45f2-ab65-a153dcbf5df2
Brody
Brody•15mo ago
please see this message but for redis you can use this official template https://railway.app/template/redis
drdrigg
drdriggOP•15mo ago
I think I used those templates for both Redis and Postgres
drdrigg
drdriggOP•15mo ago
Clicked on New and then selected this
No description
Brody
Brody•15mo ago
what you are showing me in your screenshot are the plugins, those are not the same as templates I linked
drdrigg
drdriggOP•15mo ago
I selected Add postgresl and Add redis Ah ok
drdrigg
drdriggOP•15mo ago
So I select from there instead?
No description
Brody
Brody•15mo ago
as per this message, you can't set the regions of the plugins, you'd need to use the templates I linked correct
drdrigg
drdriggOP•15mo ago
And then I will be able to have all on the same region?
Brody
Brody•15mo ago
correct again
drdrigg
drdriggOP•15mo ago
So I remove the old "redis" and then I use the template. It says "ready to be deployed" but I find no way to deploy it.
Brody
Brody•15mo ago
screenshot please
drdrigg
drdriggOP•15mo ago
Mmm this new redis template appears in all my projects now 🙂
Brody
Brody•15mo ago
seriously?? can you send me a screenshot of the full browser window?
drdrigg
drdriggOP•15mo ago
Ah, it was a UI bug (?), it appeared along side the other plugins no matter until I found (and pushed) the Deploy button now it "attached" to the project I was in. When I pushed
Brody
Brody•15mo ago
so all good and it's deployed now?
drdrigg
drdriggOP•15mo ago
This is how it looked Easy to think it was part of the project 🙂
Brody
Brody•15mo ago
but is it deployed into your desired project now?
drdrigg
drdriggOP•15mo ago
Deploying 2 sec
Brody
Brody•15mo ago
you'd reference it's variables the same way you referenced the redis plugins variables
drdrigg
drdriggOP•15mo ago
Seems like that yes
No description
drdrigg
drdriggOP•15mo ago
But I need to remove the first Postgres and Redis right?
Brody
Brody•15mo ago
looks good to me correct
drdrigg
drdriggOP•15mo ago
What exactly has I done now? Added two databases to this project, right? The right way
drdrigg
drdriggOP•15mo ago
And do I need to remove and add these again?
No description
Brody
Brody•15mo ago
yes you would need to update the reference variables give this a read https://docs.railway.app/develop/variables#reference-variables
drdrigg
drdriggOP•15mo ago
Cant I just select from the list?
No description
Brody
Brody•15mo ago
looks like you can, but maybe rename the old plugins so you can differentiate between the two
drdrigg
drdriggOP•15mo ago
I removed the old plugins I do need to add the region variable to the database templates too right?
Brody
Brody•15mo ago
perfect, then yeah use the autocomplete to add the database variables to your service and yes you would need to set a region in those new database services otherwise they deploy to us-west1
drdrigg
drdriggOP•15mo ago
I think I selected the right variables but it was a mess 🙂
No description
No description
drdrigg
drdriggOP•15mo ago
Postgres got redis icon for example
drdrigg
drdriggOP•15mo ago
Not icon but name (redisport for postgres template) for example
No description
Brody
Brody•15mo ago
that's not ideal, good thing it's still a beta feature
drdrigg
drdriggOP•15mo ago
Yes the difference between template and plugin is a bit hard to grasp
Brody
Brody•15mo ago
thats fair
Medim
Medim•15mo ago
There won't be plugins in the near future tho, right?
Brody
Brody•15mo ago
i dont actually know the roadmap for how the deprecation will go down
drdrigg
drdriggOP•15mo ago
Hopefully the migration from plugin to template will be as magical as the rest of Railway actually is (in a good way).
Brody
Brody•15mo ago
yeah im sure it will go smoothly
drdrigg
drdriggOP•15mo ago
So I can continue using the plugins until it is out of beta
Brody
Brody•15mo ago
well you already switched over?
drdrigg
drdriggOP•15mo ago
BTW, I was looking of moving a database from Vultr to Railway, any good idea how to do that smoothly, do you have a tool for that? Well I am testing out Railway before moving my production servers here. So all works.
Brody
Brody•15mo ago
you would want to use pg_dump and pg_restore
drdrigg
drdriggOP•15mo ago
ok
Brody
Brody•15mo ago
theres nothing railway native
drdrigg
drdriggOP•15mo ago
I am currently using Cloud66 for managing my servers and they let me open up the console on the server to run rake tasks. Anything like that here on Railway?
Brody
Brody•15mo ago
there is no ssh/console access on railway, but depending on what you are doing with the rake tasks you could run the command locally with railway run <command> that will give the command ran access to the service variables from the railway service its linked to, so if the command you want to run only interacts with the databases and not the filesystem then that will work for you
drdrigg
drdriggOP•15mo ago
Just want to run rake tasks when fixing things in the database Will check out railway run
drdrigg
drdriggOP•15mo ago
Thank you
Brody
Brody•15mo ago
no problem, if you need any more help with the platform let me know!
drdrigg
drdriggOP•15mo ago
Is it possible to get the server logs? Hard to know what when wrong on the server, I just get 500 error.
Brody
Brody•15mo ago
you can view the deployment logs
drdrigg
drdriggOP•15mo ago
Its not updating, just log from deployment, not runtime
Brody
Brody•15mo ago
if you log to stdout/stderr without buffering, you will see it in the deployment logs, so make sure you are logging to stdout/stderr without buffering
drdrigg
drdriggOP•15mo ago
Without logs I am blind.
Brody
Brody•15mo ago
show me screenshot though?
drdrigg
drdriggOP•15mo ago
All I see and it is static (not changing after deploy)
No description
Brody
Brody•15mo ago
then please take this into consideration
drdrigg
drdriggOP•15mo ago
Thanks, got logs working Nice
Brody
Brody•15mo ago
awesome
Want results from more Discord servers?
Add your server