Commit 7c3289f7e1eb8a5c381b156825dd9cd80ba27403

Authored by Jacob Vosmaer
1 parent 2f09bc5a
Exists in master

Give NGINX its own working directory

CHANGELOG
... ... @@ -9,6 +9,7 @@ omnibus-gitlab repository.
9 9 - Log `rake db:migrate` output in /tmp
10 10 - Support `issue_closing_pattern` via gitlab.rb (Michael Hill)
11 11 - Use SIGHUP for zero-downtime NGINX configuration changes
  12 +- Give NGINX its own working directory
12 13  
13 14 7.2.0
14 15 - Pass environment variables to Unicorn and Sidekiq (Chris Portman)
... ...
files/gitlab-cookbooks/gitlab/recipes/nginx.rb
... ... @@ -18,11 +18,13 @@
18 18  
19 19 nginx_dir = node['gitlab']['nginx']['dir']
20 20 nginx_etc_dir = File.join(nginx_dir, "etc")
  21 +nginx_working_dir = File.join(nginx_dir, "working")
21 22 nginx_log_dir = node['gitlab']['nginx']['log_directory']
22 23  
23 24 [
24 25 nginx_dir,
25 26 nginx_etc_dir,
  27 + nginx_working_dir,
26 28 nginx_log_dir,
27 29 ].each do |dir_name|
28 30 directory dir_name do
... ...
files/gitlab-cookbooks/gitlab/templates/default/sv-nginx-run.erb
1 1 #!/bin/sh
2 2 exec 2>&1
3 3 <%= render("mount_point_check.erb") %>
  4 +cd <%= File.join(node['gitlab']['nginx']['dir'], "working") %>
4 5 exec chpst -P /opt/gitlab/embedded/sbin/nginx -c <%= File.join(node['gitlab']['nginx']['dir'], "etc", "nginx.conf") %>
... ...