Skip to content
This repository has been archived by the owner on Jul 11, 2020. It is now read-only.

Commit

Permalink
add nginx blacklist file
Browse files Browse the repository at this point in the history
  • Loading branch information
dwradcliffe committed Sep 13, 2014
1 parent b5c1301 commit a534849
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 6 deletions.
2 changes: 1 addition & 1 deletion cookbooks/rubygems-balancer/metadata.rb
@@ -1,6 +1,6 @@
name 'rubygems-balancer'

version '0.0.29'
version '0.0.32'

depends 'chef-vault'
depends 'nginx'
Expand Down
7 changes: 7 additions & 0 deletions cookbooks/rubygems-balancer/recipes/site.rb
Expand Up @@ -11,6 +11,13 @@
notifies :restart, 'service[nginx]', :immediately
end

file "#{node['nginx']['dir']}/blacklist.conf" do
action :create_if_missing
owner 'root'
group 'root'
mode '0644'
end

template "#{node['nginx']['dir']}/sites-available/rubygems" do
source 'site.conf.erb'
owner 'root'
Expand Down
6 changes: 4 additions & 2 deletions cookbooks/rubygems-balancer/templates/default/site.conf.erb
Expand Up @@ -50,7 +50,8 @@ server {
deny all;
}

include <%= node['nginx']['dir'] %>/filters.conf;
include <%= node['nginx']['dir'] %>/filters.conf; # managed by chef
include <%= node['nginx']['dir'] %>/blacklist.conf; # not managed by chef

location ~ /gems/(.*)\.gem$ {
set $gem $1;
Expand Down Expand Up @@ -213,7 +214,8 @@ server {

client_max_body_size 500M;

include <%= node['nginx']['dir'] %>/filters.conf;
include <%= node['nginx']['dir'] %>/filters.conf; # managed by chef
include <%= node['nginx']['dir'] %>/blacklist.conf; # not managed by chef

##### BEGIN legacy rules

Expand Down
2 changes: 1 addition & 1 deletion environments/common.json
Expand Up @@ -7,7 +7,7 @@
"rubygems-app": "= 0.0.31",
"rubygems-apt": "= 0.0.15",
"rubygems-backups": "= 0.0.18",
"rubygems-balancer": "= 0.0.29",
"rubygems-balancer": "= 0.0.32",
"rubygems-bastion": "= 0.0.10",
"rubygems-cache": "= 0.0.3",
"rubygems-chef": "= 0.0.29",
Expand Down
2 changes: 1 addition & 1 deletion environments/production.json
Expand Up @@ -7,7 +7,7 @@
"rubygems-app": "= 0.0.31",
"rubygems-apt": "= 0.0.15",
"rubygems-backups": "= 0.0.18",
"rubygems-balancer": "= 0.0.29",
"rubygems-balancer": "= 0.0.32",
"rubygems-bastion": "= 0.0.10",
"rubygems-cache": "= 0.0.3",
"rubygems-chef": "= 0.0.29",
Expand Down
2 changes: 1 addition & 1 deletion environments/staging.json
Expand Up @@ -7,7 +7,7 @@
"rubygems-app": "= 0.0.31",
"rubygems-apt": "= 0.0.15",
"rubygems-backups": "= 0.0.18",
"rubygems-balancer": "= 0.0.29",
"rubygems-balancer": "= 0.0.32",
"rubygems-bastion": "= 0.0.10",
"rubygems-cache": "= 0.0.3",
"rubygems-chef": "= 0.0.29",
Expand Down

0 comments on commit a534849

Please sign in to comment.