2 years ago
I keep trying to deploy a simple django project. I keep getting the error of not having a start command. I have also built several projects with pipenv and I would like to know how to get these to run successfully as well.
ⓘ Deployment information is only viewable by Project members and Railway admins.
29 Replies
2 years ago
You would want to have a railway.json file, here's an example of that -
https://github.com/railwayapp-templates/django/blob/main/railway.json
2 years ago
Am I able to add custom commands such as cd
2 years ago
I have yet to see a legitimate use case for doing cd in start commands, whenever I've seen it done there has always been a better way.
So please tell me your use case.
2 years ago
in my case, I am using pipenv soo, the procedure can be something like
pipenv install : this is the equivalent of installing requirements
2. It is also used to create the virtual environment
so, the command to use would be : pip install pipenv
then : pipenv install , this will be to install from the Pipfile.lock
2 years ago
It was just an example
2 years ago
So where would be an ideal place to include the different commands needed for deployment, and are there specific key names I should use
2 years ago
Nixpacks should pick up on the Pipfile by default and run all the needed commands for you during the build.
2 years ago
Also for the cd, because I do have a file that is having the 2 directories, one with the project and another from with documentation on my git, how can i add such a command to search in the nix directory
2 years ago
As mentioned, cd is likely being misused here, are you able to share your repo so I can give better advice on this topic?
2 years ago
If your app needs the markdown files in the Documentation folder you should have that folder on the directory level as the rest of your app, you have your app in an AMSProject folder meaning that's what you'd also want to set the railway service's root directory to.
2 years ago
Yea, the other folder simply isnt being read. However, I have found great value in the link you sent.
Also, do i add these "PIPENVVENVIN_PROJECT=1 pipenv install --deploy" as environment variables?
2 years ago
Whoaa, thats awesome!
2 years ago
Hi,
It has successfully been built, however I currently cant access the app it keeps saying there's nothing here yet.
This is the link.
https://alumni-management-system-production.up.railway.app/
2 years ago
Yea, I just loaded and I also received the same error, any ideas what may be wrong
2 years ago
is there a way to verify if the django server was started
My logs, seem ok, but I had seen a message about the makemigrations and migrate message before the logs succeeded
Attachments
2 years ago
is there a way to verify if the django server was started
Yes, check your deploy logs.
2 years ago
2 years ago
Hahaha, yea, my bad thanks for the reminder.
2 years ago
I managed, to get it to show a different error, the error, I am now getting is :
I got a message that the server didnt respond first then the 400 Bad Request
2 years ago
Cool, lemme try setting up a separate project
2 years ago
Hi, Hi
I am getting an error "python: can't open file 'manage.py': [Errno 2] No such file or directory" and I currently have no idea, what I have done wrong or rather how to resolve this error.
It is showing that the deployment completed successfully however.
2 years ago
I had previously covered that issue too -
https://help.railway.app/questions/how-to-add-the-start-command-1f34705e#p-12