R
Railwayβ€’3mo ago
jugorocks

Migrating from Fly.io

So i have an app on Node.js with express server and stuff, MongoDB, Bunny CDN. I want to deploy it to Railway. I want to know how's it done. Can i deploy my app using same dockerfile with Railway CLI ? or i need to setup Prisma for the todos and ... i don't know what then yet.. In other words my question is: what's the plan when i have a ready to go app on my laptop and i just want it up an running in the clouds?
32 Replies
Percy
Percyβ€’3mo ago
Project ID: N/A
Brody
Brodyβ€’3mo ago
if you have an app in a github repo with a dockerfile that works on fly, it should by all means work on railway without issue you would of course need to copy your mongo data from from to railway though
jugorocks
jugorocksβ€’3mo ago
ad08a77d-aad2-49a5-a577-35ef1db977ff supposed to be proj id
Brody
Brodyβ€’3mo ago
project ids are really only needed if theres an issue with the platform
jugorocks
jugorocksβ€’3mo ago
1. no github repo i have. can make. 2. i have to migrate DB ? can't keep my routes and logic? have to turn to Prisma in order to?
Brody
Brodyβ€’3mo ago
1. then you can use the cli with railway up the same as you do with fly and their cli 2. well i assume you want to run mongo on railway too, so yeah you would need bring your data over, unless im wrong and you use atlas?
jugorocks
jugorocksβ€’3mo ago
so when i deloy to Fly i use powershell and fom project folder pun 'fly deploy' . Is it how it's done with Railway cli or is it anouter way
Brody
Brodyβ€’3mo ago
fly deploy -> railway up same thing
jugorocks
jugorocksβ€’3mo ago
i meant i work with remote db at mongo.* not my deployment . just http routes.
Brody
Brodyβ€’3mo ago
oh so you use mongo atlas?
jugorocks
jugorocksβ€’3mo ago
i guess so : ) i just set it up and it works. where can i get the client?
that github repo in the last messages in | cli chat ? i found it.
thanks for help πŸ–οΈ
Brody
Brodyβ€’3mo ago
coming to railway, you will need to know such things as where your database is hosted https://docs.railway.app/guides/cli#installing-the-cli
jugorocks
jugorocksβ€’3mo ago
all works. my app is up! thanks for support. i really needed it after a bunch of unsuccessful battles with Fly. cheers
Brody
Brodyβ€’3mo ago
happy to help
jugorocks
jugorocksβ€’3mo ago
i have one other question then: ) i'd like to know how to make the cli to patch the image instead of uploading the whole thing over again. by default it seems to send it whole. 2nd time the build was 4 times faster but uploading was same as the first. is there a tweak to tell it to upload only modified layers.
Brody
Brodyβ€’3mo ago
your project will always be uploaded in full, and railway already does layer caching
jugorocks
jugorocksβ€’3mo ago
ok. got it. i like it logs to powershell. very handy!
Brody
Brodyβ€’3mo ago
indeed!
jugorocks
jugorocksβ€’3mo ago
omg. filter for logs! i'm crying it's not just good. it's got easter eggs here and there!
Brody
Brodyβ€’3mo ago
check out this page - https://railway.app/features
jugorocks
jugorocksβ€’3mo ago
cool. thnx. can i use A and AAA recs for domain? i see only CNAME option
Brody
Brodyβ€’3mo ago
you can only use CNAMEs as railway does not provide static IPs yet
jugorocks
jugorocksβ€’3mo ago
ah i see. i got that issue with "redirected too many times" . figuring it out. any clue?
jugorocks
jugorocksβ€’3mo ago
yeah i read this. but didn't find where to set up the ssl thing. i get it it's at Railway side huh?
Brody
Brodyβ€’3mo ago
that's in cloudflare
jugorocks
jugorocksβ€’3mo ago
it's flattered
Brody
Brodyβ€’3mo ago
I'm sorry I don't know what that means
jugorocks
jugorocksβ€’3mo ago
found it successfullyy happy migrated! https://readway.app/
Brody
Brodyβ€’3mo ago
happy to hear that!
jugorocks
jugorocksβ€’3mo ago
now on new Rails ! ha : ) thanks πŸ–οΈ
Brody
Brodyβ€’3mo ago
happy to help!