Deploy Django App - Crashing
Project-ID : bbee3469-8d0f-4c9a-996f-c47676542f62
Preperation:
I've searched the discord conversations and have found multiple topics on this issue with those who have had the same issue. You've suggested they create a requirements.txt file and in some other cases indivuduals solved it on their own and didn't include how and in one case an indivicual said redeploying worked fine.
In my case, I already have followed the suggested steps. But after everything is deployed, it eventually always crashes.
Application Repo: https://github.com/lmayfield78/toilet_train
ERRORS:
GitHub
GitHub - lmayfield78/toilet_train: The toilets
The toilets. Contribute to lmayfield78/toilet_train development by creating an account on GitHub.
15 Replies
Project ID:
bbee3469-8d0f-4c9a-996f-c47676542f62
folder structure is a bit wrong
move every file from the root into the toilet_train_project folder.
move everything out of the toilet_train_project folder into the root.
remove the quotes from within the procfile
Followed the instructions...I think. Failed faster. I believe I might be missing something from your instructions.
Repo: https://github.com/lmayfield78/toilet_train
Error:
GitHub
GitHub - lmayfield78/toilet_train: The toilets
The toilets. Contribute to lmayfield78/toilet_train development by creating an account on GitHub.
bro what happened, this like 10x worse
let me know when everything you just did is undone
Everything is reverted.
The strange part about Django is when we run the command to startproject, it creates the project file and the sub-project file with the same exact name. So I end up with two files with the same name. And from there it allows us to create the application directory. If the file structure is wrong, I'm wondering if that's a django thing or just what I need to change in order to use Railway.
Thanks for the help BTW.
dont know why i didnt think of this sooner, just make your structure look like this
https://github.com/railwayapp-templates/django
Ok done. I noticed the template didn't have some things I had and did have some things I don't. But I believe this reflects it.
https://github.com/lmayfield78/toilet_train
Verified - Still crashing with the error
ModuleNotFoundError: No module named 'toilet_train_app'
GitHub
GitHub - lmayfield78/toilet_train: The toilets
The toilets. Contribute to lmayfield78/toilet_train development by creating an account on GitHub.
still wrong structure, here just replace the contents of your repo with the contents of this zip
https://test-service1.up.railway.app/
Thank you for fixing this for me. I appreciate your help.
I have a request. If anyone comes after me and searches through the conversations and comes across this one, would you be able to walk me through what I did wrong? I followed the steps of the Django documentation. The structure was as they specified and the app ran locally.
You knew exactly what was wrong and how to fix it. Is that documented somewhere? Or are there any references you can point me to to bookmark/study so I can learn to problem solve myself?
I'd really like to know how or where I need to learn what you already knew.
Thanks for your assistance.
funny enough ive never even worked on a django app for myself, and im not even a python dev
this is what i used for reference on how to get your app up and running, thats all i did, make yours look like this one
Ah ok. I did notice your version had an additional
.json
file.
I know you said you just reflected the directory structure, but was there anything you immediately knew was wrong based on knowledge? I'm learning that theres a difference of how to build a Django app
vs deploying a Django app in railway
In any case, you helped me out a ton. Thanks.I simply just looked at railways template for django, and looked at yours, made them the same and it worked, you're definitely over thinking this
looked at the structure of the template, made yours the same.
looked at the settings.py from the template, made yours the same.
looked at the start command of the template (railway.json), made yours the same.
etc.
etc.
Ah, got it. Thanks again.
no problem 🙂