I am following this tutorial, until up to this part.
start.sh
#!/bin/bash
# Start Gunicorn processes
echo Starting Gunicorn.
exec gunicorn helloworld.wsgi:application \
--bind 0.0.0.0:8000 \
--workers 3
My directories is like this.
awesome_app
-awesome_app
--__init__.py
--celery.py
--settings.py
--urls.py
--wsgi.py
-awesome_app_to_do_list
--a lot of stuffs here
-manage.py
-start.sh
Here is the content of my wsgi.py.
"""
WSGI config for airport project.
It exposes the WSGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/1.11/howto/deployment/wsgi/
"""
import os
from django.core.wsgi import get_wsgi_application
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "awesome_app.settings")
application = get_wsgi_application()
I adapted the launch code to this.
#!/bin/bash
# Start Gunicorn processes
echo starting gunicorn
exec gunicorn awesome_app.wsgi:application \
--bind 0.0.0.0:8080 \
--workers 3
After I make it executable and run the script from the root of the project awesome_app and not from awesome_app/awesome_app. I received this error, ImportError: No module named 'myproject'
. I have looked at this SO discussion, but the error is still there. What should I do?