R
Railway•14mo 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•14mo ago
Project ID: 988851b6-78d5-44de-a73d-3e5b6468c8bf
drdrigg
drdrigg•14mo ago
988851b6-78d5-44de-a73d-3e5b6468c8bf Project ID: 988851b6-78d5-44de-a73d-3e5b6468c8bf
Medim
Medim•14mo 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•14mo ago
Something went wrong. Please try again.
drdrigg
drdrigg•14mo 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•14mo ago
fun fact we can all see that something went wrong message
Medim
Medim•14mo ago
yeah, i've seen a lot of that message lately is it a bug or sumthin?
Brody
Brody•14mo 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
drdrigg•14mo 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•14mo ago
u just got the discord role, try again
Brody
Brody•14mo ago
I gave them that
Percy
Percy•14mo ago
Something went wrong. Please try again.
Brody
Brody•14mo 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
drdrigg•14mo ago
The admin panel says this
No description
drdrigg
drdrigg•14mo ago
I will try to deploy
Brody
Brody•14mo ago
please try this
drdrigg
drdrigg•14mo ago
I add the variable and get this
No description
drdrigg
drdrigg•14mo ago
Tried pressing on both Will deploy now
Brody
Brody•14mo ago
did you use the raw editor
drdrigg
drdrigg•14mo 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
drdrigg•14mo ago
BTW, I am trying this project now: 2a996a89-6751-45f2-ab65-a153dcbf5df2
Brody
Brody•14mo ago
please see this message but for redis you can use this official template https://railway.app/template/redis
drdrigg
drdrigg•14mo ago
I think I used those templates for both Redis and Postgres
drdrigg
drdrigg•14mo ago
Clicked on New and then selected this
No description
Brody
Brody•14mo ago
what you are showing me in your screenshot are the plugins, those are not the same as templates I linked
drdrigg
drdrigg•14mo ago
I selected Add postgresl and Add redis Ah ok
drdrigg
drdrigg•14mo ago
So I select from there instead?
No description
Brody
Brody•14mo 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
drdrigg•14mo ago
And then I will be able to have all on the same region?
Brody
Brody•14mo ago
correct again
drdrigg
drdrigg•14mo 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•14mo ago
screenshot please
drdrigg
drdrigg•14mo ago
Mmm this new redis template appears in all my projects now 🙂
Brody
Brody•14mo ago
seriously?? can you send me a screenshot of the full browser window?
drdrigg
drdrigg•14mo 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•14mo ago
so all good and it's deployed now?
drdrigg
drdrigg•14mo ago
This is how it looked Easy to think it was part of the project 🙂
Brody
Brody•14mo ago
but is it deployed into your desired project now?
drdrigg
drdrigg•14mo ago
Deploying 2 sec
Brody
Brody•14mo ago
you'd reference it's variables the same way you referenced the redis plugins variables
drdrigg
drdrigg•14mo ago
Seems like that yes
No description
drdrigg
drdrigg•14mo ago
But I need to remove the first Postgres and Redis right?
Brody
Brody•14mo ago
looks good to me correct
drdrigg
drdrigg•14mo ago
What exactly has I done now? Added two databases to this project, right? The right way
drdrigg
drdrigg•14mo ago
And do I need to remove and add these again?
No description
Brody
Brody•14mo ago
yes you would need to update the reference variables give this a read https://docs.railway.app/develop/variables#reference-variables
drdrigg
drdrigg•14mo ago
Cant I just select from the list?
No description
Brody
Brody•14mo ago
looks like you can, but maybe rename the old plugins so you can differentiate between the two
drdrigg
drdrigg•14mo ago
I removed the old plugins I do need to add the region variable to the database templates too right?
Brody
Brody•14mo 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
drdrigg•14mo ago
I think I selected the right variables but it was a mess 🙂
No description
No description
drdrigg
drdrigg•14mo ago
Postgres got redis icon for example
drdrigg
drdrigg•14mo ago
Not icon but name (redisport for postgres template) for example
No description
Brody
Brody•14mo ago
that's not ideal, good thing it's still a beta feature
drdrigg
drdrigg•14mo ago
Yes the difference between template and plugin is a bit hard to grasp
Brody
Brody•14mo ago
thats fair
Medim
Medim•14mo ago
There won't be plugins in the near future tho, right?
Brody
Brody•14mo ago
i dont actually know the roadmap for how the deprecation will go down
drdrigg
drdrigg•14mo 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•14mo ago
yeah im sure it will go smoothly
drdrigg
drdrigg•14mo ago
So I can continue using the plugins until it is out of beta
Brody
Brody•14mo ago
well you already switched over?
drdrigg
drdrigg•14mo 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•14mo ago
you would want to use pg_dump and pg_restore
drdrigg
drdrigg•14mo ago
ok
Brody
Brody•14mo ago
theres nothing railway native
drdrigg
drdrigg•14mo 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•14mo 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
drdrigg•14mo ago
Just want to run rake tasks when fixing things in the database Will check out railway run
drdrigg
drdrigg•14mo ago
Thank you
Brody
Brody•14mo ago
no problem, if you need any more help with the platform let me know!
drdrigg
drdrigg•14mo 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•14mo ago
you can view the deployment logs
drdrigg
drdrigg•14mo ago
Its not updating, just log from deployment, not runtime
Brody
Brody•14mo 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
drdrigg•14mo ago
Without logs I am blind.
Brody
Brody•14mo ago
show me screenshot though?
drdrigg
drdrigg•14mo ago
All I see and it is static (not changing after deploy)
No description
Brody
Brody•14mo ago
then please take this into consideration
drdrigg
drdrigg•14mo ago
Thanks, got logs working Nice
Brody
Brody•14mo ago
awesome
Want results from more Discord servers?
Add your server