Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/diaspora/diaspora.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/chef
diff options
context:
space:
mode:
authorRaphael <raphael@joindiaspora.com>2010-12-02 05:29:46 +0300
committerRaphael <raphael@joindiaspora.com>2010-12-02 23:35:26 +0300
commit952888713f5aa8dc38ca213713e4c99e92bff026 (patch)
tree10508948fce411f28707058ada2f2254d29ac3df /chef
parentcee5e4c26e2287ff4b00829ce5bf659b54ba1cd7 (diff)
Finish daemontools lines for resque
Diffstat (limited to 'chef')
-rw-r--r--chef/cookbooks/common/recipes/daemontools.rb11
-rw-r--r--chef/cookbooks/common/templates/default/nginx.conf.erb11
2 files changed, 21 insertions, 1 deletions
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 {