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
Project ID:
25a35d14-c8aa-42e5-9e2f-8f056e0251b1
what's your current waitress start command?
python server.py
are you using waitress in code to run the app?
if so, please show me that related code
from waitress import serve
from muddyboots.wsgi import application
if name == 'main':
serve(application, port='8000')
perfect, so instead of hardcoding your port, read the port from the
PORT
environment variable, or default to 8000How would I change that? 🙂
web: waitress-serve --port=$PORT muddyboots:app
That's Procfile
well that's a lot different than the command you gave me here
What is the correct command?
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?
I usually use manage.py runserver for local.
okay that's fine too
let me know how this works on railway
'web:' is not recognized as an internal or external command,
operable program or batch file.
send your actual Procfile
web: waitress-serve --port=$PORT muddyboots:app
build logs please https://bookmarklets.up.railway.app/log-downloader/
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.
i dont work for railway, that link doesnt do anything for me