R
Railway•11mo ago
River

Django Project, Github and Waitress

I'm trying to deploy my Django project using a Github repository. I'm unable to use Gounicorn, so I used Waitress. I have created the correct files (Procfile, requirements.txt, server.py, runtime.txt) I've also added the whitenoise to the static files and changed the Allowed Hosts. Application Failed To Respond is the error. Thank you. 25a35d14-c8aa-42e5-9e2f-8f056e0251b1
18 Replies
Percy
Percy•11mo ago
Project ID: 25a35d14-c8aa-42e5-9e2f-8f056e0251b1
Brody
Brody•11mo ago
what's your current waitress start command?
River
RiverOP•11mo ago
python server.py
Brody
Brody•11mo ago
are you using waitress in code to run the app? if so, please show me that related code
River
RiverOP•11mo ago
from waitress import serve from muddyboots.wsgi import application if name == 'main': serve(application, port='8000')
Brody
Brody•11mo ago
perfect, so instead of hardcoding your port, read the port from the PORT environment variable, or default to 8000
River
RiverOP•11mo ago
How would I change that? 🙂 web: waitress-serve --port=$PORT muddyboots:app That's Procfile
Brody
Brody•11mo ago
well that's a lot different than the command you gave me here
River
RiverOP•11mo ago
What is the correct command?
Brody
Brody•11mo ago
this is the correct start command from what I can tell, after skimming the docs for waitress-serve this is what you use locally right?
River
RiverOP•11mo ago
I usually use manage.py runserver for local.
Brody
Brody•11mo ago
okay that's fine too let me know how this works on railway
River
RiverOP•11mo ago
'web:' is not recognized as an internal or external command, operable program or batch file.
Brody
Brody•11mo ago
send your actual Procfile
River
RiverOP•11mo ago
web: waitress-serve --port=$PORT muddyboots:app
River
RiverOP•11mo ago
Railway
404 - Page not found
Railway is an infrastructure platform where you can provision infrastructure, develop with that infrastructure locally, and then deploy to the cloud.
Brody
Brody•11mo ago
i dont work for railway, that link doesnt do anything for me
Want results from more Discord servers?
Add your server