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

a month 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

$10 Bounty

0 Replies

medim
MODERATOR

a month ago

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


medim
MODERATOR

a month 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

a month ago

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


Anonymous
PROOP

a month ago

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


Anonymous
PROOP

a month ago

hello?


medim
MODERATOR

a month 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

a month 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

a month ago

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


medim
MODERATOR

a month ago

yeah.


medim
MODERATOR

a month 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

a month 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

a month ago

watch path don't work


medim
MODERATOR

a month ago

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


Anonymous
PROOP

a month ago

what if I change a library


Anonymous
PROOP

a month ago

nx affected detects which apps use that library


Anonymous
PROOP

a month ago

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


medim
MODERATOR

a month 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

a month ago

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


Anonymous
PROOP

a month 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


medim
MODERATOR

a month 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

a month 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

a month 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?


Loading...