Skip to content

Commit

Permalink
Install gunicorn into the django virtualenv.
Browse files Browse the repository at this point in the history
I would normally avoid duplicating what the gunicorn cookbook does, but this is literally 4 lines of code; any other solution would be much more intrusive for very little gain.
  • Loading branch information
Andrea Campi committed Apr 12, 2012
1 parent 0be18c3 commit 8f68a53
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion providers/gunicorn.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,11 @@

action :before_compile do

include_recipe "gunicorn"
include_recipe "supervisor"

django_resource = new_resource.application.sub_resources.select{|res| res.type == :django}.first
gunicorn_install :virtualenv => django_resource.nil? ? nil : django_resource.virtualenv

if !new_resource.restart_command
new_resource.restart_command do
run_context.resource_collection.find(:supervisor_service => new_resource.application.name).run_action(:restart)
Expand Down

0 comments on commit 8f68a53

Please sign in to comment.