Commit 1f09a78c756382a812fb5c324c9bbfc25dc9a46a

Authored by Marin Jankovski
1 parent a7e203b7
Exists in master

Move socket directory creation to unicorn section.

files/gitlab-cookbooks/gitlab/recipes/gitlab-rails.rb
... ... @@ -47,13 +47,6 @@ directory gitlab_rails_dir do
47 47 recursive true
48 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 50 directory gitlab_rails_public_uploads_dir do
58 51 owner node['gitlab']['user']['username']
59 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 27  
28 28 [
29 29 unicorn_log_dir,
30   - unicorn_socket_dir,
31 30 File.dirname(unicorn_pidfile)
32 31 ].each do |dir_name|
33 32 directory dir_name do
... ... @@ -37,6 +36,13 @@ unicorn_socket_dir = File.dirname(unicorn_listen_socket)
37 36 end
38 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 46 unicorn_listen_tcp = node['gitlab']['unicorn']['listen']
41 47 unicorn_listen_tcp << ":#{node['gitlab']['unicorn']['port']}"
42 48  
... ...
files/gitlab-cookbooks/gitlab/templates/default/nginx.conf.erb
... ... @@ -2,7 +2,7 @@
2 2 # erased! To change the contents below, edit /etc/gitlab/gitlab.rb
3 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 6 worker_processes <%= @worker_processes %>;
7 7 error_log /var/log/gitlab/nginx/error.log;
8 8 pid /var/opt/gitlab/nginx/nginx.pid;
... ...