pvcglue 0.1.28 → 0.1.29

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c56db4a7378a7ddeea2201b0e45a8fb78708ffd2
4
- data.tar.gz: 8eedb984f35fc085d352045a327d6c92cae3677e
3
+ metadata.gz: 2890cccd0710566ea507d1c23da0a7a68f8b7bfe
4
+ data.tar.gz: 1fb1590b756c1cc4a1269c281e0d2ffacd4ad5d6
5
5
  SHA512:
6
- metadata.gz: 6433deb598cb1bc3a6136168c0a5b32a3232dd48f0f55d0a6d4b645b78b9b69452cf270f736c6b3652ab9343893ac39a18ef5f0bd284c2d9488bb2097198fc4f
7
- data.tar.gz: 1c161a335f0feac6d06f72ed018a397b8ab09d7f761a00dc94131c66182004aa5e3aad4fe0d9a69bdc019792b819fdded0add7f667ba9b7b99acba56af759b25
6
+ metadata.gz: 7158f52deb021af5493fd7955565b825cbb5c1c15912f0c6c34868cea6e9ca58def75b6f1423c0d58ad5643abdf2602f52ecf7f613783a59d64be6373614d8e5
7
+ data.tar.gz: c2dbc3ff023af3947de40504564a628da2d97b21232bf59937d8946cf261911eafceb92c91231746621dbda2e9f5fa534229611ea69d4c5edb02c92b1344308e
data/lib/pvcglue/cloud.rb CHANGED
@@ -240,6 +240,22 @@ module Pvcglue
240
240
  data[app_name][:repo_url]
241
241
  end
242
242
 
243
+ def dos_conn_limit_per_ip
244
+ data[app_name][:dos_conn_limit_per_ip] || stage[:dos_conn_limit_per_ip] || "10"
245
+ end
246
+
247
+ def dos_rate
248
+ data[app_name][:dos_rate] || stage[:dos_rate] || "1"
249
+ end
250
+
251
+ def dos_burst
252
+ data[app_name][:dos_burst] || stage[:dos_burst] || "30"
253
+ end
254
+
255
+ def additional_linked_dirs
256
+ data[app_name][:additional_linked_dirs] || stage[:additional_linked_dirs] || ""
257
+ end
258
+
243
259
  def client_header_timeout
244
260
  data[app_name][:client_header_timeout] || stage[:client_header_timeout] || "60s"
245
261
  end
@@ -1,3 +1,3 @@
1
1
 
2
- limit_conn conn_limit_per_ip 10;
3
- limit_req zone=req_limit_per_ip burst=30 nodelay;
2
+ limit_conn conn_limit_per_ip <%= Pvcglue.cloud.dos_conn_limit_per_ip %>;
3
+ limit_req zone=req_limit_per_ip burst=<%= Pvcglue.cloud.dos_burst %> nodelay;
@@ -5,7 +5,7 @@ set :repo_url, '<%= Pvcglue.cloud.repo_url %>'
5
5
 
6
6
  set :branch, proc { `git rev-parse --abbrev-ref HEAD`.chomp }
7
7
 
8
- set :linked_dirs, %w{log tmp/pids tmp/cache tmp/sockets}
8
+ set :linked_dirs, %w{log tmp/pids tmp/cache tmp/sockets <%= Pvcglue.cloud.additional_linked_dirs %>}
9
9
 
10
10
  set :bundle_flags, '--deployment' # Remove the `--quiet` flag
11
11
 
@@ -88,7 +88,7 @@ http {
88
88
 
89
89
  # DoS prevention
90
90
  limit_conn_zone $binary_remote_addr zone=conn_limit_per_ip:10m;
91
- limit_req_zone $binary_remote_addr zone=req_limit_per_ip:10m rate=1r/s;
91
+ limit_req_zone $binary_remote_addr zone=req_limit_per_ip:10m rate=<%= Pvcglue.cloud.dos_rate %>r/s;
92
92
 
93
93
  include /etc/nginx/conf.d/*.conf;
94
94
  include /etc/nginx/sites-enabled/*;
@@ -1,3 +1,3 @@
1
1
  module Pvcglue
2
- VERSION = "0.1.28"
2
+ VERSION = "0.1.29"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pvcglue
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.28
4
+ version: 0.1.29
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Lyric
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-11-18 00:00:00.000000000 Z
11
+ date: 2015-11-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler