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

Commit

Permalink
use instance variable for stat server
Browse files Browse the repository at this point in the history
  • Loading branch information
dwradcliffe committed Jun 20, 2014
1 parent 365b6c2 commit 32938ce
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Berksfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ GRAPH
runit (>= 0.0.0)
unicorn (>= 0.0.0)
user (>= 0.0.0)
rubygems-balancer (0.0.9)
rubygems-balancer (0.0.10)
chef-vault (>= 0.0.0)
nginx (>= 0.0.0)
rubygems (>= 0.0.0)
Expand Down
3 changes: 2 additions & 1 deletion cookbooks/rubygems-balancer/metadata.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
name 'rubygems-balancer'
version '0.0.9'

version '0.0.10'

depends 'chef-vault'
depends 'nginx'
Expand Down
6 changes: 3 additions & 3 deletions cookbooks/rubygems-balancer/templates/default/site.conf.erb
Original file line number Diff line number Diff line change
Expand Up @@ -207,15 +207,15 @@ server {

##### BEGIN legacy rules

<% if stat_server = node["application"]["stat_server"] %>
<% if @stat_server %>
location = /__log {
internal;
proxy_pass http://<%= stat_server %>/gems/$gem.gem;
proxy_pass http://<%= @stat_server %>/gems/$gem.gem;
}
<% end %>

location ~ /gems/(.*)\.gem$ {
<% if node["application"]["stat_server"] %>
<% if @stat_server %>
set $gem $1;
post_action /__log;
<% end %>
Expand Down

0 comments on commit 32938ce

Please sign in to comment.