Deployment from local with railway up fails
mertzamir
PROOP

8 months ago

I'm trying to leverage Railway CLI for manually doing feature branch deployments from my local. The idea is to manually deploy the feature branch i have locally to the target service in my development environment on Railway.

What I do:
- railway login # (successfully auth with this)
- railway link -e development -s ai_api <absolute_path_to_my_local_monorepo> # (this fails)

No matter what i tried in the PATH arg, nothing works. The error message I'm seeing complains about: config file /ai-api/railway.json does not exist

I have the following monorepo structure:

(root level)
-- rest-api/
---- railway.json
-- ai-api/
---- railway.json
-- some-other-app/
---- railway.json

So each service in my monorepo has a unique railway.json and they get deployed to their respective services on Railway. I'm running the railway up command from the root level of my project. For the PATH argument I've tried the absolute path of my monorepo as well as the absolute path of the service inside monorepo I'm tryin to deploy. None worked... Any help is appreciated here...

Solved$20 Bounty

Pinned Solution

mertzamir
PROOP

8 months ago

[edit: resolved] I think this was due to total bundle size being > 40mb. I've started using .railwayignore and now it works. Also another mistake i was doing was not starting railway login from my project directory. I used login command when i first opened the terminal so my home directory, then cd ed into my project directory and none of the up commands picked up the correct path altough i was providing the full absolute path as an argument... TLDR: running railway login from my project directory and using .railwayignore to reduce bundle size to only my implementation code helped.

1 Replies

mertzamir
PROOP

8 months ago

[edit: resolved] I think this was due to total bundle size being > 40mb. I've started using .railwayignore and now it works. Also another mistake i was doing was not starting railway login from my project directory. I used login command when i first opened the terminal so my home directory, then cd ed into my project directory and none of the up commands picked up the correct path altough i was providing the full absolute path as an argument... TLDR: running railway login from my project directory and using .railwayignore to reduce bundle size to only my implementation code helped.


Status changed to Solved chandrika 9 months ago


Loading...