Commit 7cb4a2aaa4ff78c1b148466aa084b1233b34092c
1 parent
112cfd28
Exists in
master
and in
17 other branches
Add domain socket unicorn config
Showing
2 changed files
with
16 additions
and
10 deletions
Show diff stats
files/gitlab-cookbooks/gitlab/attributes/default.rb
| @@ -42,10 +42,11 @@ default['gitlab']['gitlab-core']['dir'] = "/var/opt/gitlab/gitlab-core" | @@ -42,10 +42,11 @@ default['gitlab']['gitlab-core']['dir'] = "/var/opt/gitlab/gitlab-core" | ||
| 42 | default['gitlab']['gitlab-core']['log_directory'] = "/var/log/gitlab/gitlab-core" | 42 | default['gitlab']['gitlab-core']['log_directory'] = "/var/log/gitlab/gitlab-core" |
| 43 | default['gitlab']['gitlab-core']['environment'] = 'production' | 43 | default['gitlab']['gitlab-core']['environment'] = 'production' |
| 44 | default['gitlab']['gitlab-core']['listen'] = '127.0.0.1' | 44 | default['gitlab']['gitlab-core']['listen'] = '127.0.0.1' |
| 45 | -default['gitlab']['gitlab-core']['port'] = 9462 | ||
| 46 | -default['gitlab']['gitlab-core']['backlog'] = 1024 | ||
| 47 | -default['gitlab']['gitlab-core']['tcp_nodelay'] = true | ||
| 48 | -default['gitlab']['gitlab-core']['worker_timeout'] = 3600 | 45 | +default['gitlab']['gitlab-core']['port'] = 8080 |
| 46 | +default['gitlab']['gitlab-core']['unicorn_socket'] = '/var/opt/gitlab/gitlab-core/tmp/sockets/gitlab.socket' | ||
| 47 | +default['gitlab']['gitlab-core']['tcp_nopush'] = true | ||
| 48 | +default['gitlab']['gitlab-core']['backlog_socket'] = 64 | ||
| 49 | +default['gitlab']['gitlab-core']['worker_timeout'] = 30 | ||
| 49 | default['gitlab']['gitlab-core']['umask'] = "0022" | 50 | default['gitlab']['gitlab-core']['umask'] = "0022" |
| 50 | default['gitlab']['gitlab-core']['worker_processes'] = 2 | 51 | default['gitlab']['gitlab-core']['worker_processes'] = 2 |
| 51 | default['gitlab']['gitlab-core']['session_key'] = "_sandbox_session" | 52 | default['gitlab']['gitlab-core']['session_key'] = "_sandbox_session" |
files/gitlab-cookbooks/gitlab/recipes/gitlab-core.rb
| @@ -51,14 +51,19 @@ link "/opt/gitlab/embedded/service/gitlab-core/.secret" do | @@ -51,14 +51,19 @@ link "/opt/gitlab/embedded/service/gitlab-core/.secret" do | ||
| 51 | to secret_token_config | 51 | to secret_token_config |
| 52 | end | 52 | end |
| 53 | 53 | ||
| 54 | -unicorn_listen = node['gitlab']['gitlab-core']['listen'] | ||
| 55 | -unicorn_listen << ":#{node['gitlab']['gitlab-core']['port']}" | 54 | +unicorn_listen_tcp = node['gitlab']['gitlab-core']['listen'] |
| 55 | +unicorn_listen_tcp << ":#{node['gitlab']['gitlab-core']['port']}" | ||
| 56 | +unicorn_listen_socket = node['gitlab']['gitlab-core']['unicorn_socket'] | ||
| 56 | 57 | ||
| 57 | unicorn_config File.join(gitlab_core_etc_dir, "unicorn.rb") do | 58 | unicorn_config File.join(gitlab_core_etc_dir, "unicorn.rb") do |
| 58 | - listen unicorn_listen => { | ||
| 59 | - :backlog => node['gitlab']['gitlab-core']['backlog'], | ||
| 60 | - :tcp_nodelay => node['gitlab']['gitlab-core']['tcp_nodelay'] | ||
| 61 | - } | 59 | + listen( |
| 60 | + unicorn_listen_tcp => { | ||
| 61 | + :tcp_nopush => node['gitlab']['gitlab-core']['tcp_nopush'] | ||
| 62 | + }, | ||
| 63 | + unicorn_listen_socket => { | ||
| 64 | + :backlog => node['gitlab']['gitlab-core']['backlog_socket'], | ||
| 65 | + } | ||
| 66 | + ) | ||
| 62 | worker_timeout node['gitlab']['gitlab-core']['worker_timeout'] | 67 | worker_timeout node['gitlab']['gitlab-core']['worker_timeout'] |
| 63 | working_directory gitlab_core_working_dir | 68 | working_directory gitlab_core_working_dir |
| 64 | worker_processes node['gitlab']['gitlab-core']['worker_processes'] | 69 | worker_processes node['gitlab']['gitlab-core']['worker_processes'] |