https://blog.railway.com/p/nx-railway-with-gh-actions error
Anonymous
PROOP

10 months ago

I get this error when it tries to run the script /home/runner/work/_temp/0c8e73e8-40e7-4079-8d58-901f6480a484.sh: line 1: ./deployment/railway-trigger.sh: Permission denied

Solved$10 Bounty

24 Replies

10 months ago

That is a very outdated blog post (3+ years old), have you checked these docs? https://docs.railway.com/guides/monorepo


10 months ago

There, it shows how to deploy shared and isolated monorepos, as well as how to define a watch path to prevent code changes in one service from triggering a rebuild of other services in said monorepo.


Anonymous
PROOP

10 months ago

I am using NX.... this page doesn't mention how to take advantage of nx affected


Anonymous
PROOP

10 months ago

what if some code changes in a library that affects a few projects, how will it know which to deploy?


Anonymous
PROOP

10 months ago

hello?


10 months ago

With the deprecation of Nixpacks, we don't have specific configs for NX Monorepos anymore, they should be treated like a normal monorepo.

For the NX affected/selective deploys you would need to use a CI (like the GH Actions mentioned in the blog post you linked) to build the affected packages and trigger a Railway deployment just for those services.


Anonymous
PROOP

10 months ago

I can't seem to figure out how to "trigger a deployment". Do I need to build a docker container like I was on kube? do I somehow upload the build assets from nx build?


Anonymous
PROOP

10 months ago

the ai had me adding some nixpacks... so I guess that's a dead end?


10 months ago

yeah.


10 months ago

"I can't seem to figure out how to "trigger a deployment""

You can use watch paths, when files on determined path are updated the service gets redeployed.


Anonymous
PROOP

10 months ago

is there some way I can get some 1 on 1 support call to ask a few questions and figure this out cause I'm really stuck, I see a good vision with railway here but I am completely lost on how to get this project going


Anonymous
PROOP

10 months ago

watch path don't work


10 months ago

You don't "build a docker container" or "upload NX build outputs"


Anonymous
PROOP

10 months ago

what if I change a library


Anonymous
PROOP

10 months ago

nx affected detects which apps use that library


Anonymous
PROOP

10 months ago

and only build and deploys those apps. a watch path on the apps directory won't capture that


10 months ago

Then you would add that library path to the dependent service's watch path, it allows multiple watch paths and follows a gitignore style.


Anonymous
PROOP

10 months ago

that would be crazy to maintain..... the libraries are automitically detected based on which app "imports" that library


Anonymous
PROOP

10 months ago

like this is a massive monorepo, its not even always clear which apps depend on which lib, and which lib depends on another lib, without looking at a huge graph


10 months ago

Then you'd have to use a CI flow to deploy just the affected apps, I'm sure you can do that through a GH Actions Workflow but I cant really help you on this since NX Monorepos are a bit out of my scope.


Anonymous
PROOP

10 months ago

ok so what exactly do I deploy?

I run nx build oauth-api

outputs go to dist/apps/oauth-api

what do I do to deploy that?


Anonymous
PROOP

10 months ago

these are just nodejs apps that were built into a docker container, pushed to aws, loaded by kubernetes... if I don't need to do any of that, then what do I do?


malhous
HOBBY

8 months ago

Hey, any updates on this? Facing similar problems, and we're trying to avoid maintaining watched files through Railway Portal.

How did you solve it @_mr_e ?


Anonymous
PROOP

8 months ago

I cantinued building docker containers through Github actions, pushing to Github packages and updating the service to use that image


Status changed to Solved medim 8 months ago


Welcome!

Sign in to your Railway account to join the conversation.

Loading...