Django channels not working on the production environment

Kkane5/24/2023
I recently deployed a websocket chat app that I developed with Django channels. It works perfectly fine on my local computer even without Daphne web server, but it does not work on production. I followed the docs and installed Daphne, added the configuration on my ProcFile and it still does not work, all I get is a 404 error on every websocket request when I debug. I noticed that my app is still being served with Gunicorn instead of Daphne. Please what am I not doing correctly?

Javascript console error: WebSocket connection to 'wss://sitename.up.railway.app/ws/api/chats/create/?token=750e80203245ee5db475006b6229ca391f836f0f12983939330237' failed:

Project ID: 4713c1f6-1710-4e59-bfc6-2aaa0aaea3e0

ProcFile Configuration:web: daphne accountGig.asgi:application --port $PORT --bind 0.0.0.0 -v2

Packages :
channels==3.0.4 channels-redis==4.1.0 daphne==3.0.2 Django==4.0.3 gunicorn==20.1.0
Bbrody5/24/2023
do you have a repo please?
Kkane5/24/2023
yes i have a private repository
Bbrody5/24/2023
okay screenshot of the repos files please?
Kkane5/24/2023
here it is
Bbrody5/24/2023
I see the issue, but first, what is the file named railway for?
Kkane5/24/2023
It is autogenerated
Kkane5/24/2023
I didn’t put that there
Kkane5/24/2023
Please where am I wrong ?
Bbrody5/24/2023
ProcFile --> Procfile
Bbrody5/24/2023
wrong letter casing
Kkane5/24/2023
Oh 🤦🏽‍♂️ I’d change that now and try again : )
Bbrody5/24/2023
small nit pick, you have gunicorn in your requirements but are using daphne, you could remove gunicorn right? the less dependencies the faster the build 🙂
Kkane5/25/2023
Thank you very much I renamed procfile and it worked 🫡
Kkane5/25/2023
definitely I’d be removing gunicorn now, Although daphne is very slow don’t know how to fasten it 🥲