Skip to content

Instantly share code, notes, and snippets.

@maruno
Created February 9, 2017 10:04
Show Gist options
  • Save maruno/1cc81db9be2114d1733a442f950fa64d to your computer and use it in GitHub Desktop.
Save maruno/1cc81db9be2114d1733a442f950fa64d to your computer and use it in GitHub Desktop.
Gunicorn serve script with venv
#!/usr/home/michel/daemons/bynder-web/env/bin/python
# EASY-INSTALL-ENTRY-SCRIPT: 'gunicorn==19.4.5','console_scripts','gunicorn'
__requires__ = 'gunicorn==19.4.5'
import re
import sys
from pkg_resources import load_entry_point
if __name__ == '__main__':
sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0])
sys.exit(
load_entry_point('gunicorn==19.4.5', 'console_scripts', 'gunicorn')()
)
bin/gunicorn_venv --paste settings.ini --workers 2 --worker-class gaiohttp --timeout 60 -b :4860 --worker-tmp-dir /tmp/gunicorns --user michel --group wheel --reload
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment