akoumjian / salt-django-example

An example of a salt state tree for Django deployment
85 stars 16 forks source link

Gunicorn Doesn't Start On First Deploy #3

Open andresdouglas opened 11 years ago

andresdouglas commented 11 years ago

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

akoumjian commented 11 years ago

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.

andresdouglas commented 11 years ago

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 notifications@github.comwrote:

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 .

akoumjian commented 11 years ago

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.

andresdouglas commented 11 years ago

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

akoumjian commented 11 years ago

Absolutely. Both deployment and setting up dev environments.