salt-django-example icon indicating copy to clipboard operation
salt-django-example copied to clipboard

Gunicorn Doesn't Start On First Deploy

Open andresdouglas opened this issue 12 years ago • 5 comments

When deploying for the first time to a new server gunicorn doesn't seem to run, resulting in a 502 bad gateway courtesy of NGINX. Should look into how salt is supposedly starting it up. This might be related to https://github.com/akoumjian/salt-django-example/issues/1

andresdouglas avatar Oct 16 '13 00:10 andresdouglas

Sorry about that, I thought I had fixed that issue. This repository is relatively out of date in my opinion. I have started using uwsgi for most of my django project now, and I'm thinking of updating this to reflect that.

akoumjian avatar Oct 16 '13 16:10 akoumjian

Alec, that would be great, thanks. Why have you moved over to uWsgi if I may ask?

Andres Douglas | @andresdouglas | http://andresdouglas.com

On Wed, Oct 16, 2013 at 9:33 AM, Alec Koumjian [email protected]:

Sorry about that, I thought I had fixed that issue. This repository is relatively out of date in my opinion. I have started using uwsgi for most of my django project now, and I'm thinking of updating this to reflect that.

— Reply to this email directly or view it on GitHubhttps://github.com/akoumjian/salt-django-example/issues/3#issuecomment-26434699 .

andresdouglas avatar Oct 16 '13 19:10 andresdouglas

I really like uWSGI's built in emperor mode for process management. I find my app restarts are quicker and I don't lose any requests proxied through nginx. I find adding supervisord/circus to manage gunicorn rather onerous and adds unneeded complexity.

So now my setup involves: uWSGI running my django app and I have my celery and other tasks running as Ubuntu upstart jobs.

akoumjian avatar Oct 16 '13 19:10 akoumjian

That sounds cool. Are you using these salt states for deployment?

andresdouglas avatar Oct 16 '13 19:10 andresdouglas

Absolutely. Both deployment and setting up dev environments.

akoumjian avatar Oct 16 '13 19:10 akoumjian