Commit 1f09a78c756382a812fb5c324c9bbfc25dc9a46a
1 parent
a7e203b7
Exists in
master
Move socket directory creation to unicorn section.
Showing
3 changed files
with
8 additions
and
9 deletions
Show diff stats
files/gitlab-cookbooks/gitlab/recipes/gitlab-rails.rb
| @@ -47,13 +47,6 @@ directory gitlab_rails_dir do | @@ -47,13 +47,6 @@ directory gitlab_rails_dir do | ||
| 47 | recursive true | 47 | recursive true |
| 48 | end | 48 | end |
| 49 | 49 | ||
| 50 | -directory File.join(gitlab_rails_dir, "sockets") do | ||
| 51 | - owner node['gitlab']['user']['username'] | ||
| 52 | - group node['gitlab']['webserver']['username'] | ||
| 53 | - mode '0770' | ||
| 54 | - recursive true | ||
| 55 | -end | ||
| 56 | - | ||
| 57 | directory gitlab_rails_public_uploads_dir do | 50 | directory gitlab_rails_public_uploads_dir do |
| 58 | owner node['gitlab']['user']['username'] | 51 | owner node['gitlab']['user']['username'] |
| 59 | group node['gitlab']['webserver']['username'] | 52 | group node['gitlab']['webserver']['username'] |
files/gitlab-cookbooks/gitlab/recipes/unicorn.rb
| @@ -27,7 +27,6 @@ unicorn_socket_dir = File.dirname(unicorn_listen_socket) | @@ -27,7 +27,6 @@ unicorn_socket_dir = File.dirname(unicorn_listen_socket) | ||
| 27 | 27 | ||
| 28 | [ | 28 | [ |
| 29 | unicorn_log_dir, | 29 | unicorn_log_dir, |
| 30 | - unicorn_socket_dir, | ||
| 31 | File.dirname(unicorn_pidfile) | 30 | File.dirname(unicorn_pidfile) |
| 32 | ].each do |dir_name| | 31 | ].each do |dir_name| |
| 33 | directory dir_name do | 32 | directory dir_name do |
| @@ -37,6 +36,13 @@ unicorn_socket_dir = File.dirname(unicorn_listen_socket) | @@ -37,6 +36,13 @@ unicorn_socket_dir = File.dirname(unicorn_listen_socket) | ||
| 37 | end | 36 | end |
| 38 | end | 37 | end |
| 39 | 38 | ||
| 39 | +directory unicorn_socket_dir do | ||
| 40 | + owner node['gitlab']['user']['username'] | ||
| 41 | + group node['gitlab']['webserver']['username'] | ||
| 42 | + mode '0750' | ||
| 43 | + recursive true | ||
| 44 | +end | ||
| 45 | + | ||
| 40 | unicorn_listen_tcp = node['gitlab']['unicorn']['listen'] | 46 | unicorn_listen_tcp = node['gitlab']['unicorn']['listen'] |
| 41 | unicorn_listen_tcp << ":#{node['gitlab']['unicorn']['port']}" | 47 | unicorn_listen_tcp << ":#{node['gitlab']['unicorn']['port']}" |
| 42 | 48 |
files/gitlab-cookbooks/gitlab/templates/default/nginx.conf.erb
| @@ -2,7 +2,7 @@ | @@ -2,7 +2,7 @@ | ||
| 2 | # erased! To change the contents below, edit /etc/gitlab/gitlab.rb | 2 | # erased! To change the contents below, edit /etc/gitlab/gitlab.rb |
| 3 | # and run `sudo gitlab-ctl reconfigure`. | 3 | # and run `sudo gitlab-ctl reconfigure`. |
| 4 | 4 | ||
| 5 | -user <%= node['gitlab']['user']['username'] %> <%= node['gitlab']['webserver']['username']%>; | 5 | +user <%= node['gitlab']['webserver']['username'] %> <%= node['gitlab']['webserver']['username']%>; |
| 6 | worker_processes <%= @worker_processes %>; | 6 | worker_processes <%= @worker_processes %>; |
| 7 | error_log /var/log/gitlab/nginx/error.log; | 7 | error_log /var/log/gitlab/nginx/error.log; |
| 8 | pid /var/opt/gitlab/nginx/nginx.pid; | 8 | pid /var/opt/gitlab/nginx/nginx.pid; |