I am trying to host my django app using heroku and waitress package in windows environment. I have defined the profile for running wsgi application . Where do I need to define the correct port and run the heroku app?
This is for a new windows server running django app and heroku. In the past, I have tried on defining various port numbers on procfile to run the app,but it not worked and shows error on permission.
Procfile:
web: waitress-serve --port=80 ACE:wsgi.application
I expect the django app to run on heroku inn browser, using command
-heroku local web
The output which I got is:
[OKAY] Loaded ENV .env File as KEY=VALUE Format
16:15:41 web.1 | Traceback (most recent call last):
16:15:41 web.1 | File "c:\users\ramakrishnan_k\appdata\local\programs\python\python36-32\lib\runpy.py", line 193, in _run_module_as_main
16:15:41 web.1 | "__main__", mod_spec)
16:15:41 web.1 | File "c:\users\ramakrishnan_k\appdata\local\programs\python\python36-32\lib\runpy.py", line 85, in _run_code
16:15:41 web.1 | exec(code, run_globals)
16:15:41 web.1 | File "C:\Users\ramakrishnan_k\AppData\Local\Programs\Python\Python36-32\Scripts\waitress-serve.exe\__main__.py", line 9, in <module>
16:15:41 web.1 | File "c:\users\ramakrishnan_k\appdata\local\programs\python\python36-32\lib\site-packages\waitress\runner.py", line 279, in run
16:15:41 web.1 | _serve(app, **kw)
16:15:41 web.1 | File "c:\users\ramakrishnan_k\appdata\local\programs\python\python36-32\lib\site-packages\waitress\__init__.py", line 11, in serve
16:15:41 web.1 | server = _server(app, **kw)
16:15:41 web.1 | File "c:\users\ramakrishnan_k\appdata\local\programs\python\python36-32\lib\site-packages\waitress\server.py", line 85, in create_server
16:15:41 web.1 | sockinfo=sockinfo)
16:15:41 web.1 | File "c:\users\ramakrishnan_k\appdata\local\programs\python\python36-32\lib\site-packages\waitress\server.py", line 229, in __init__
16:15:41 web.1 | self.bind_server_socket()
16:15:41 web.1 | File "c:\users\ramakrishnan_k\appdata\local\programs\python\python36-32\lib\site-packages\waitress\server.py", line 360, in bind_server_socket
16:15:41 web.1 | self.bind(sockaddr)
16:15:41 web.1 | File "c:\users\ramakrishnan_k\appdata\local\programs\python\python36-32\lib\site-packages\waitress\wasyncore.py", line 369, in bind
16:15:41 web.1 | return self.socket.bind(addr)
16:15:41 web.1 | OSError: [WinError 10013] An attempt was made to access a socket in a way forbidden by its access permissions
16:15:41 web.1 | C:\Users\ramakrishnan_k\Desktop\Dock\static/ static path
16:15:41 web.1 | C:\Users\ramakrishnan_k\Desktop\Dock\media media rooot
16:15:41 web.1 Exited with exit code 1
which is wrong.
The expected output as it should give u okay status with env and procfile status and run the heroku app in browser.