Examples of using unicorn & pyramid

106 views
Skip to first unread message

Kate Boelhauf

unread,
Feb 4, 2014, 12:45:16 PM2/4/14
to pylons-...@googlegroups.com
Hi All,
  Can anyone point be to examples of using gunicorn with Pyramid.  I can get this example to work: https://www.digitalocean.com/community/articles/how-to-deploy-python-wsgi-apps-using-gunicorn-http-server-behind-nginx - but when I update the WSGI file to incorporate my pyramid app it breaks.

Specifically I am interested in examples of WSGI files and also the command used to start gunicorn. I am unsure whether I should be using $ gunicorn [OPTIONS] APP_MODULE or $ paster serve development.ini workers=2

Arndt Droullier

unread,
Feb 4, 2014, 2:07:48 PM2/4/14
to Pyramid on google groups
You can use the ini file options and start pyramid just by passing the ini file name.

e.g. bin/pserve development.ini

Gunicorn is loaded in the ini file:

[app:main]
use = egg:myapp

pyramid.reload_templates = false
pyramid.debug_authorization = false
pyramid.debug_notfound = false
pyramid.debug_routematch = false
pyramid.debug_templates = false
pyramid.default_locale_name = en

[server:main]
use = egg:gunicorn#main
host = 0.0.0.0
port = 6543
worker = 4
worker_class = gevent
#worker_class = eventlet
#worker_class = sync

Arndt.


2014-02-04 Kate Boelhauf <ka...@katimari.com>:

Hi All,
  Can anyone point be to examples of using gunicorn with Pyramid.  I can get this example to work: https://www.digitalocean.com/community/articles/how-to-deploy-python-wsgi-apps-using-gunicorn-http-server-behind-nginx - but when I update the WSGI file to incorporate my pyramid app it breaks.

Specifically I am interested in examples of WSGI files and also the command used to start gunicorn. I am unsure whether I should be using $ gunicorn [OPTIONS] APP_MODULE or $ paster serve development.ini workers=2



--
Arndt Droullier, Nive GmbH, Köln, Germany | Nive Open Source Cms: cms.nive.co

Kate Boelhauf

unread,
Feb 4, 2014, 11:30:40 PM2/4/14
to pylons-...@googlegroups.com
Thanks so much - that worked for me!

Michael

unread,
Feb 5, 2014, 12:01:09 AM2/5/14
to pylons-...@googlegroups.com
I have a pyramid github project that, once setup, will serve a skeleton pyramid app as a gunicorn process behind nginx:

Kate Boelhauf

unread,
Feb 5, 2014, 12:28:46 AM2/5/14
to pylons-...@googlegroups.com
Thanks Michael - I'll check that out - I'm sure it will help!
Reply all
Reply to author
Forward
0 new messages