Commit b3d56f0d7ae1b4fb517e4f6d87b060acbbd0fbba

Authored by Rodrigo Siqueira de Melo
1 parent c706f7cf

Replace thin by unicorn.

Signed-off-by: Thiago Ribeiro <thiagitosouza@gmail.com>
cookbooks/noosfero/recipes/default.rb
@@ -89,7 +89,7 @@ execute &#39;software:create_licenses&#39; do @@ -89,7 +89,7 @@ execute &#39;software:create_licenses&#39; do
89 command 'sudo -u noosfero bundle exec rake software:create_licenses RAILS_ENV=production' 89 command 'sudo -u noosfero bundle exec rake software:create_licenses RAILS_ENV=production'
90 end 90 end
91 91
92 -template '/etc/noosfero/thin.yml' do 92 +template '/etc/noosfero/unicorn.rb' do
93 owner 'root'; group 'root'; mode 0644 93 owner 'root'; group 'root'; mode 0644
94 notifies :restart, 'service[noosfero]' 94 notifies :restart, 'service[noosfero]'
95 end 95 end
cookbooks/noosfero/templates/nginx.conf.erb
1 # MANAGED WITH CHEF; DO NOT CHANGE BY HAND 1 # MANAGED WITH CHEF; DO NOT CHANGE BY HAND
2 2
3 upstream noosfero { 3 upstream noosfero {
4 -<% (1..(`nproc`.strip.to_i)).each do |p| %>  
5 - server 127.0.0.1:<%= 9000 + p - 1 %> fail_timeout=10s;  
6 -<% end %> 4 + server 127.0.0.1:9000 fail_timeout=10s;
7 } 5 }
8 6
9 server { 7 server {
cookbooks/noosfero/templates/thin.yml.erb
@@ -1,15 +0,0 @@ @@ -1,15 +0,0 @@
1 ----  
2 -chdir: /usr/lib/noosfero  
3 -environment: production  
4 -address: 127.0.0.1  
5 -port: 9000  
6 -timeout: 30  
7 -log: log/thin.log  
8 -pid: tmp/pids/thin.pid  
9 -max_conns: 1024  
10 -max_persistent_conns: 512  
11 -require: []  
12 -wait: 30  
13 -daemonize: true  
14 -servers: <%= `nproc`.strip %>  
15 -prefix: /social  
test/noosfero_test.sh
@@ -5,7 +5,7 @@ test_database_connectivity() { @@ -5,7 +5,7 @@ test_database_connectivity() {
5 } 5 }
6 6
7 test_noosfero_running() { 7 test_noosfero_running() {
8 - assertTrue 'Noosfero running' 'run_on social pgrep -u noosfero -f thin' 8 + assertTrue 'Noosfero running' 'run_on social pgrep -u noosfero -f unicorn'
9 } 9 }
10 10
11 test_noosfero_on_subdir() { 11 test_noosfero_on_subdir() {