Commit 3de27f07d355ff05b8238574d65f14cc40c2522b
1 parent
9ad162c6
Exists in
master
and in
17 other branches
Create uploads and sockets directories
Showing
2 changed files
with
6 additions
and
0 deletions
Show diff stats
files/gitlab-cookbooks/gitlab/attributes/default.rb
| @@ -58,6 +58,7 @@ default['gitlab']['gitlab-core']['external_port'] = 80 | @@ -58,6 +58,7 @@ default['gitlab']['gitlab-core']['external_port'] = 80 | ||
| 58 | default['gitlab']['gitlab-core']['external_https'] = false | 58 | default['gitlab']['gitlab-core']['external_https'] = false |
| 59 | default['gitlab']['gitlab-core']['notification_email'] = "gitlab@#{node['fqdn']}" | 59 | default['gitlab']['gitlab-core']['notification_email'] = "gitlab@#{node['fqdn']}" |
| 60 | default['gitlab']['gitlab-core']['support_email'] = "support@example.com" | 60 | default['gitlab']['gitlab-core']['support_email'] = "support@example.com" |
| 61 | +default['gitlab']['gitlab-core']['uploads_directory'] = "/var/opt/gitlab/uploads" | ||
| 61 | 62 | ||
| 62 | 63 | ||
| 63 | ### | 64 | ### |
files/gitlab-cookbooks/gitlab/recipes/gitlab-core.rb
| @@ -19,6 +19,8 @@ gitlab_core_dir = node['gitlab']['gitlab-core']['dir'] | @@ -19,6 +19,8 @@ gitlab_core_dir = node['gitlab']['gitlab-core']['dir'] | ||
| 19 | gitlab_core_etc_dir = File.join(gitlab_core_dir, "etc") | 19 | gitlab_core_etc_dir = File.join(gitlab_core_dir, "etc") |
| 20 | gitlab_core_working_dir = File.join(gitlab_core_dir, "working") | 20 | gitlab_core_working_dir = File.join(gitlab_core_dir, "working") |
| 21 | gitlab_core_tmp_dir = File.join(gitlab_core_dir, "tmp") | 21 | gitlab_core_tmp_dir = File.join(gitlab_core_dir, "tmp") |
| 22 | +gitlab_core_sockets_dir = File.dirname(node['gitlab']['gitlab-core']['unicorn_socket']) | ||
| 23 | +gitlab_core_public_uploads_dir = node['gitlab']['gitlab-core']['uploads_directory'] | ||
| 22 | gitlab_core_log_dir = node['gitlab']['gitlab-core']['log_directory'] | 24 | gitlab_core_log_dir = node['gitlab']['gitlab-core']['log_directory'] |
| 23 | 25 | ||
| 24 | [ | 26 | [ |
| @@ -26,6 +28,8 @@ gitlab_core_log_dir = node['gitlab']['gitlab-core']['log_directory'] | @@ -26,6 +28,8 @@ gitlab_core_log_dir = node['gitlab']['gitlab-core']['log_directory'] | ||
| 26 | gitlab_core_etc_dir, | 28 | gitlab_core_etc_dir, |
| 27 | gitlab_core_working_dir, | 29 | gitlab_core_working_dir, |
| 28 | gitlab_core_tmp_dir, | 30 | gitlab_core_tmp_dir, |
| 31 | + gitlab_core_sockets_dir, | ||
| 32 | + gitlab_core_public_uploads_dir, | ||
| 29 | gitlab_core_log_dir | 33 | gitlab_core_log_dir |
| 30 | ].each do |dir_name| | 34 | ].each do |dir_name| |
| 31 | directory dir_name do | 35 | directory dir_name do |
| @@ -114,6 +118,7 @@ end | @@ -114,6 +118,7 @@ end | ||
| 114 | # replace empty directories in the Git repo with symlinks to /var/opt/gitlab | 118 | # replace empty directories in the Git repo with symlinks to /var/opt/gitlab |
| 115 | { | 119 | { |
| 116 | "/opt/gitlab/embedded/service/gitlab-core/tmp" => gitlab_core_tmp_dir, | 120 | "/opt/gitlab/embedded/service/gitlab-core/tmp" => gitlab_core_tmp_dir, |
| 121 | + "/opt/gitlab/embedded/service/gitlab-core/public/uploads" => gitlab_core_public_uploads_dir, | ||
| 117 | "/opt/gitlab/embedded/service/gitlab-core/log" => gitlab_core_log_dir | 122 | "/opt/gitlab/embedded/service/gitlab-core/log" => gitlab_core_log_dir |
| 118 | }.each do |link_dir, target_dir| | 123 | }.each do |link_dir, target_dir| |
| 119 | directory link_dir do | 124 | directory link_dir do |