9 months ago
been trying to set a meeting with railway themselves to discuss moving forward, best practices and a better way to approach this codebase( currently its bloated)
also seeing how docker will work. so if there is anyone who is willing to have a conversation with me, ( paid if need be) i would appreciate it .
ps: current setup has the entire code uploaded for each service but only select folders being run
23 Replies
9 months ago
Hello,
Apologies, but we (the Railway team) cannot offer support for your application's architecture, but I would be happy to answer any Railway platform or product specific questions.
9 months ago
Asking here is your best bet, but please provide more details. The only information you’ve provided so far is that your codebase is bloated
the current approach that i just minimally followed ( as a monorepo using turbo) is uploading the whole code base on each of the microservices and only running the packages and microservices.
my next step should be docker
but im lacking proper theoretical approach to the dockerfiles. especially with a nestjs microservice.
at teh current moment any sense of direction will be welcome.
im willing to pay an hourly rate for whoever is available as well.
9 months ago
hey, running NestJS + NextJS on Railway with turborepo too
9 months ago
so far we're using Railway's auto build system and it's going great, Dockerfiles were a mess to maintain
9 months ago
if you have any questions, just shoot them here, no need to pay anyone
thank you @ThallesComH
was wondering how you had railway run your monorepo?
i have 3 microservices with an api gateway controller.
the issue is in every instance of hte microservice i have to upload the whole repo but only run the parts that work.
ended up creating a railway script for every repo
"build:railway": "cd ../../.. && pnpm run build --filter=@repo/shared && cd apps/backend/api-gateway-service && nest build",
is there a lighter approach you might consider ?
9 months ago
@ThallesComH pinging for visibility ^
9 months ago
Hey, earlier we were running each separate section instead of uploading the whole repo with a custom Dockerfile. However, maintaining that Dockerfile with all the environment variables wasn't worth the effort. So we decided to let Railway figure it out, which means they'll upload the entire repo on all services but will run only the relevant parts. For now, we're not experiencing any problems.
9 months ago
thanks, got busy and forgot to reply
9 months ago
No worries, thread has been bountied for you 😉
9 months ago
for commands, these are the ones we're using, kinda the same as you.


9 months ago
the thread has a bounty? didn't notice it
9 months ago
now it has 😉
8 months ago
Great! I’ve marked this thread as solved, could you please mark Thaless’ answer as the accepted answer so the bounty can be awarded?
8 months ago
Status changed to Solved adam • 9 months ago
8 months ago
pinging for visibility @Grimmjoww231
I'm running NextJs on railway. I want to pre-build it in my Github Actions, such that it activates without needing to build, after I run a database migration
It seems like the ideal approach is to have a prebuilt docker image I give to Railway that I create in the build step.
But this requires managing NextJs deployment via a custom dockerfile rather than Railway's prebuilt one. Any tradeoffs I should be wary of?
8 months ago
hello, please open your own thread. This thread has been resolved and closed for another user’s question
Status changed to Closed brody • 8 months ago