From b3d56f0d7ae1b4fb517e4f6d87b060acbbd0fbba Mon Sep 17 00:00:00 2001 From: rodrigosiqueira Date: Mon, 14 Sep 2015 17:22:10 -0300 Subject: [PATCH] Replace thin by unicorn. --- cookbooks/noosfero/recipes/default.rb | 2 +- cookbooks/noosfero/templates/nginx.conf.erb | 4 +--- cookbooks/noosfero/templates/thin.yml.erb | 15 --------------- test/noosfero_test.sh | 2 +- 4 files changed, 3 insertions(+), 20 deletions(-) delete mode 100644 cookbooks/noosfero/templates/thin.yml.erb diff --git a/cookbooks/noosfero/recipes/default.rb b/cookbooks/noosfero/recipes/default.rb index 9ea64ab..413980a 100644 --- a/cookbooks/noosfero/recipes/default.rb +++ b/cookbooks/noosfero/recipes/default.rb @@ -89,7 +89,7 @@ execute 'software:create_licenses' do command 'sudo -u noosfero bundle exec rake software:create_licenses RAILS_ENV=production' end -template '/etc/noosfero/thin.yml' do +template '/etc/noosfero/unicorn.rb' do owner 'root'; group 'root'; mode 0644 notifies :restart, 'service[noosfero]' end diff --git a/cookbooks/noosfero/templates/nginx.conf.erb b/cookbooks/noosfero/templates/nginx.conf.erb index c32bf68..f0b89a0 100644 --- a/cookbooks/noosfero/templates/nginx.conf.erb +++ b/cookbooks/noosfero/templates/nginx.conf.erb @@ -1,9 +1,7 @@ # MANAGED WITH CHEF; DO NOT CHANGE BY HAND upstream noosfero { -<% (1..(`nproc`.strip.to_i)).each do |p| %> - server 127.0.0.1:<%= 9000 + p - 1 %> fail_timeout=10s; -<% end %> + server 127.0.0.1:9000 fail_timeout=10s; } server { diff --git a/cookbooks/noosfero/templates/thin.yml.erb b/cookbooks/noosfero/templates/thin.yml.erb deleted file mode 100644 index a8b4189..0000000 --- a/cookbooks/noosfero/templates/thin.yml.erb +++ /dev/null @@ -1,15 +0,0 @@ ---- -chdir: /usr/lib/noosfero -environment: production -address: 127.0.0.1 -port: 9000 -timeout: 30 -log: log/thin.log -pid: tmp/pids/thin.pid -max_conns: 1024 -max_persistent_conns: 512 -require: [] -wait: 30 -daemonize: true -servers: <%= `nproc`.strip %> -prefix: /social diff --git a/test/noosfero_test.sh b/test/noosfero_test.sh index 03b1886..400d154 100644 --- a/test/noosfero_test.sh +++ b/test/noosfero_test.sh @@ -5,7 +5,7 @@ test_database_connectivity() { } test_noosfero_running() { - assertTrue 'Noosfero running' 'run_on social pgrep -u noosfero -f thin' + assertTrue 'Noosfero running' 'run_on social pgrep -u noosfero -f unicorn' } test_noosfero_on_subdir() { -- libgit2 0.21.2