Installing Railway CLI
Hello I wrote "npm i -g @railway/cli " to terminal to download Railway CLI however, I saw the error in the screenshot, Can you help me, thanks
50 Replies
Project ID:
N/A
You need to install
npm
N/A118c0d3a-2e06-4eee-b22c-ab02d2947048
I wrote the command you sent me in docs but I saw this error
You'd need to install nodejs
https://nodejs.org/en/download/
I am using django but should I install nodejs
I want to install railway clı
might as well <:moyai_shrug:1106001173279940758>
I installed node.js
still have the problem
could you uninstall that NodeJS
and install from the link I sent?
the one from the link I sent includes
npm
reopen that terminall
It won't take effect until u open a new terminal
ok it worked
thanks, I installed
railway cli with the comand npm i -g @railway/cli
but for now, I don't know how to continue process. When I use github, will it directly change the docs in github, or will it directly effect railway database
I am really new, in railway, don't know how to follow the proceure to update my project
It will update at every commit
If the service is linked to a github repo
the cli isn't really necessary, u can do everything through the website
it is necessary for migrations as I understand
in django
becasue I create my postgre database but it is said that there is no command line for migrations of django in railway directly
I need to use ralway clı
No you don't
Migrations can be run on the start command
You can't run a command from the railway cli to your service
You can use your railway env vars, which is the same as using your prod env on your local machine
what do you mean by sayng start command, yesterday one person said this but I stll on'unerstan
thank you Brody btw 🙂 yesterday you helped me alot
Your start command will be your migration command + the start
but I crashed in this issue
Like:
npx sequelize db:migrate && npm run start
this is for nodejs/sequelize
@Brody u better correct me if i'm wrong most probably I know, but cannot match with the concept
in django I start with python manage.py make mgiration then python manage.py migrate
ok, what is the command u use to migrate?
python manage.py migrate
?yes two commands
python maange.py makemigrations
python manage.py migrate
and whats your start command?
python manage.py runserver
python manage.py makemigrations && python manage.py migrate && python manage.py runserver
so that would be your start command
check the order, see if its correctyou are askng the command that use to run my project, right
yeah
yes
Brody veto 🙂
python manage.py runserver
starts a development server, you would need to replace this portion of your start command with the applicable gunicorn commandweb: gunicorn yv_optimizer.wsgi --log-file -
can t be, in the Procfile
yes it can
web: python manage.py migrate && gunicorn yv_optimizer.wsgi --log-file -
ok, where should I write this expression in order to mgirate my database
in the Procfile
what about the other migration command
that command is ran locally
ok, then I need to update my Procfile
welp, guess that's on me for my nonexistent python knowledge
updated
looks good to me
should I do any extra thing other than ading python manage.py makemigrations to Procfile
to add my databse
where there any errors in the deploy logs?