From 85cf8df92af62171ae14838d8b5ad796d1fb1255 Mon Sep 17 00:00:00 2001 From: Jacob Vosmaer Date: Tue, 11 Feb 2014 18:33:13 +0100 Subject: [PATCH] Get Unicorn socket from attributes --- files/gitlab-cookbooks/gitlab/recipes/nginx.rb | 3 ++- files/gitlab-cookbooks/gitlab/templates/default/nginx-gitlab-http.conf.erb | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/files/gitlab-cookbooks/gitlab/recipes/nginx.rb b/files/gitlab-cookbooks/gitlab/recipes/nginx.rb index bac5743..8630d55 100644 --- a/files/gitlab-cookbooks/gitlab/recipes/nginx.rb +++ b/files/gitlab-cookbooks/gitlab/recipes/nginx.rb @@ -44,7 +44,8 @@ template nginx_vars[gitlab_http_config] do mode "0644" variables(nginx_vars.merge( { - :fqdn => node['gitlab']['gitlab-rails']['external_fqdn'] + :fqdn => node['gitlab']['gitlab-rails']['external_fqdn'], + :socket => node['gitlab']['unicorn']['socket'] } )) notifies :restart, 'service[nginx]' if OmnibusHelper.should_notify?("nginx") diff --git a/files/gitlab-cookbooks/gitlab/templates/default/nginx-gitlab-http.conf.erb b/files/gitlab-cookbooks/gitlab/templates/default/nginx-gitlab-http.conf.erb index 3db33c6..6293dd7 100644 --- a/files/gitlab-cookbooks/gitlab/templates/default/nginx-gitlab-http.conf.erb +++ b/files/gitlab-cookbooks/gitlab/templates/default/nginx-gitlab-http.conf.erb @@ -16,7 +16,7 @@ # [2] https://github.com/agentzh/chunkin-nginx-module upstream gitlab { - server unix:/home/git/gitlab/tmp/sockets/gitlab.socket; + server unix:<%= @socket %>; } server { -- libgit2 0.21.2