diff --git a/Gemfile.lock b/Gemfile.lock index 6125d083a58317a3ccba1bab6ea1126de8accf5b..13fc8ecb9d37d86e7c78cfbb9660a920465b36ff 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -142,6 +142,8 @@ GEM childprocess (0.1.4) ffi (~> 0.6.3) closure-compiler (0.3.3) + cloudfiles (1.4.9) + mime-types (>= 1.16) columnize (0.3.2) configuration (1.1.0) crack (0.1.8) @@ -363,6 +365,7 @@ DEPENDENCIES capybara (~> 0.3.9) carrierwave! chef + cloudfiles cucumber-rails (= 0.3.2) database_cleaner (= 0.5.2) devise (= 1.1.3) diff --git a/chef/cookbooks/common/files/default/thins.yml b/chef/cookbooks/common/files/default/thins.yml index 12980b6b6184b99be37282eb915c9b6db180355b..1b981d3002fc7175677c4cdb35ff61ee6e00280e 100644 --- a/chef/cookbooks/common/files/default/thins.yml +++ b/chef/cookbooks/common/files/default/thins.yml @@ -3,3 +3,5 @@ thins: - port: '3002' - port: '3003' url: 'alpha.joindiaspora.com' +cert_location: '/usr/local/nginx/conf/diaspora.crt' +key_location: '/usr/local/nginx/conf/diaspora.key' diff --git a/chef/cookbooks/common/recipes/nginx.rb b/chef/cookbooks/common/recipes/nginx.rb index 033cbef6098d5c37c5ae3d3926e647b53e401f3c..aa07b168ed19c9eef9e9e600291b7a1dce96022a 100644 --- a/chef/cookbooks/common/recipes/nginx.rb +++ b/chef/cookbooks/common/recipes/nginx.rb @@ -29,5 +29,5 @@ end config = YAML.load_file("/usr/local/app/diaspora/chef/cookbooks/common/files/default/thins.yml") template "/usr/local/nginx/conf/nginx.conf" do source "nginx.conf.erb" - variables :ports => config['thins'].map{|thin| "#{thin["port"]}"}, :url => config['url'] + variables :ports => config['thins'].map{|thin| "#{thin["port"]}"}, :url => config['url'], :cert_location => config['cert_location'], :key_location => config['key_location'] end diff --git a/chef/cookbooks/common/templates/default/nginx.conf.erb b/chef/cookbooks/common/templates/default/nginx.conf.erb index 6ecb25d6482361b67e6153a1c8db52679d6fd515..633c082f7e1de52a55c578ac2c62b07d98884424 100644 --- a/chef/cookbooks/common/templates/default/nginx.conf.erb +++ b/chef/cookbooks/common/templates/default/nginx.conf.erb @@ -65,8 +65,8 @@ http { root /usr/local/app/diaspora/public; ssl on; - ssl_certificate /usr/local/nginx/conf/diaspora.crt; - ssl_certificate_key /usr/local/nginx/conf/diaspora.key; + ssl_certificate <%= @cert_location %>; + ssl_certificate_key <%= @key_location %>; location / { proxy_set_header X-Real-IP $remote_addr;