TODO
TODO
(env)$ gunicorn gee_bridge.wsgi:application --bind 0.0.0.0:8000
Suppose your settings are configured as below:
PROJECT_ROOT = os.path.dirname(os.path.abspath(__file__))
# Static files (CSS, JavaScript, Images)
# https://docs.djangoproject.com/en/1.9/howto/static-files/
STATIC_ROOT = os.path.join(PROJECT_ROOT, 'staticfiles')
STATIC_URL = '/static/'
# Extra places for collectstatic to find static files.
STATICFILES_DIRS = (
os.path.join(PROJECT_ROOT, 'static'),
)
Install the package:
(env)$ pip install whitenoise
(env)$ pip freeze > requirements.txt
Embed this library in your application by editing the wsgi.py file:
from django.core.wsgi import get_wsgi_application
from whitenoise.django import DjangoWhiteNoise
application = get_wsgi_application()
application = DjangoWhiteNoise(application)
Create a configuration file:
(env)$ echo_supervisord_conf > supervisord.conf
(env)$ supervisord -c supervisord.conf