diff --git a/chef/cookbooks/common/recipes/daemontools.rb b/chef/cookbooks/common/recipes/daemontools.rb index d521d1497..99b1d58c3 100644 --- a/chef/cookbooks/common/recipes/daemontools.rb +++ b/chef/cookbooks/common/recipes/daemontools.rb @@ -65,8 +65,17 @@ execute "executable" do end execute "resque worker run" do - command "mkdir -p /service/resque_worker && echo '#!/bin/sh' > /service/resque_worker/run && echo 'cd /usr/local/app/diaspora && RAILS_ENV=production QUEUE=* exec /usr/local/bin/bundle exec /usr/local/bin/rake resque:work' >> /service/resque_worker/run" + command "mkdir -p /service/resque_worker && echo '#!/bin/sh' > /service/resque_worker/run && echo 'RAILS_ENV=production QUEUE=* HOME=/usr/local/app/diaspora exec /usr/local/bin/rake resque:work' >> /service/resque_worker/run" end + execute "executable" do command "chmod -R 755 /service/resque_worker" end + +execute "resque web run" do + command "mkdir -p /service/resque_web && echo '#!/bin/sh' > /service/resque_web/run && echo 'exec resque-web' >> /service/resque_worker/run" +end + +execute "executable" do + command "chmod -R 755 /service/resque_web" +end diff --git a/chef/cookbooks/common/templates/default/nginx.conf.erb b/chef/cookbooks/common/templates/default/nginx.conf.erb index e45f2bcf7..3c2d18eab 100644 --- a/chef/cookbooks/common/templates/default/nginx.conf.erb +++ b/chef/cookbooks/common/templates/default/nginx.conf.erb @@ -87,6 +87,17 @@ http { break; } } + server { + + listen 443; + server_name <%= @url %> resque.<%= @url %>; + + ssl on; + ssl_certificate <%= @cert_location %>; + ssl_certificate_key <%= @key_location %>; + + proxy_pass localhost:5678 + } error_page 500 502 503 504 /50x.html; location = /50x.html {