I'm trying setup the gunicorn but I am facing an error for DJANGO_WSGI_MODULE.
DJANGO_WSGI_MODULE=config.wsgi
`ModuleNotFoundError: No module named 'config'
File "/webapps/myapp/myapp_venv/lib/python3.11/site-packages/gunicorn/util.py", line 371, in import_app mod = importlib.import_module(module) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.11/importlib/init.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^`
Configuration wsgi_app: None
PS: when I run the command directly in the terminal from project root, I am not getting this error. Below command is running properly.
myapp_venv/bin/gunicorn config.wsgi:application --name myapp --workers 3 --timeout 120 --user=myappapi --group=webapps --bind=unix:/webapps/myapp/run/gunicorn.sock --log-level=debug --log-file=-
Can anyone help please? Thanks
I tried to search for wsgi app name but it doesn't work.
I also tried to run the command manually and it worked so it looks like directory path related issue.
I also think that wsgi_app is set to None which can be causing the issue.
I followed this YT video to set this up and have asked question there as well. https://www.youtube.com/watch?v=RIE0O0Lbk8U
