recipiez 0.1.3 → 0.1.4
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.
- data/recipes/logrotate.rb +2 -4
- data/recipes/nginx.rb +3 -3
- data/recipes/templates/nginx_node.erb +34 -1
- data/recipiez.gemspec +6 -3
- metadata +6 -6
data/recipes/logrotate.rb
CHANGED
@@ -3,10 +3,8 @@ Capistrano::Configuration.instance(true).load do
|
|
3
3
|
namespace :logrotate do
|
4
4
|
desc "Configures logrotate for the application"
|
5
5
|
task :configure, :roles => [:app, :web] do
|
6
|
-
|
7
|
-
|
8
|
-
set :log_directory, 'log'
|
9
|
-
end
|
6
|
+
|
7
|
+
_cset :log_directory, 'log'
|
10
8
|
|
11
9
|
generated = render('logrotate', binding)
|
12
10
|
puts generated
|
data/recipes/nginx.rb
CHANGED
@@ -26,10 +26,10 @@ Capistrano::Configuration.instance(true).load do
|
|
26
26
|
|
27
27
|
desc "Generates a simple proxy configuration for a nodejs application"
|
28
28
|
task :nodejs do
|
29
|
+
|
30
|
+
_cset :node_port, 3000
|
31
|
+
_cset :ssl, 'off'
|
29
32
|
|
30
|
-
unless exists? :node_port
|
31
|
-
set :node_port, 3000
|
32
|
-
end
|
33
33
|
|
34
34
|
put render("nginx_node", binding), "#{application}.conf"
|
35
35
|
sudo "mv #{application}.conf /etc/nginx/sites-available/#{application}.conf"
|
@@ -8,7 +8,9 @@ upstream <%= application %> {
|
|
8
8
|
server {
|
9
9
|
listen 0.0.0.0:80;
|
10
10
|
server_name <%= app_domain %>;
|
11
|
+
|
11
12
|
access_log /var/log/nginx/<%= application %>.log;
|
13
|
+
error_log /var/log/nginx/<%= application %>.log;
|
12
14
|
|
13
15
|
# pass the request to the node.js server with the correct headers and much more can be added, see nginx config options
|
14
16
|
location / {
|
@@ -20,4 +22,35 @@ server {
|
|
20
22
|
proxy_pass http://<%= application %>/;
|
21
23
|
proxy_redirect off;
|
22
24
|
}
|
23
|
-
}
|
25
|
+
}
|
26
|
+
|
27
|
+
|
28
|
+
<% if ssl == 'on' %>
|
29
|
+
|
30
|
+
server {
|
31
|
+
|
32
|
+
listen 0.0.0.0:443;
|
33
|
+
ssl on;
|
34
|
+
|
35
|
+
access_log /var/log/nginx/<%= application %>.log;
|
36
|
+
error_log /var/log/nginx/<%= application %>.log;
|
37
|
+
|
38
|
+
ssl_certificate <%= ssl_cert %>;
|
39
|
+
ssl_certificate_key <%= ssl_key %>;
|
40
|
+
|
41
|
+
# pass the request to the node.js server with the correct headers and much more can be added, see nginx config options
|
42
|
+
location / {
|
43
|
+
proxy_set_header X-Real-IP $remote_addr;
|
44
|
+
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
45
|
+
proxy_set_header Host $http_host;
|
46
|
+
proxy_set_header X-NginX-Proxy true;
|
47
|
+
|
48
|
+
proxy_pass http://<%= application %>/;
|
49
|
+
proxy_redirect off;
|
50
|
+
}
|
51
|
+
|
52
|
+
|
53
|
+
}
|
54
|
+
|
55
|
+
|
56
|
+
<% end %>
|
data/recipiez.gemspec
CHANGED
@@ -1,16 +1,19 @@
|
|
1
1
|
# -*- encoding: utf-8 -*-
|
2
2
|
lib = File.expand_path('../lib/', __FILE__)
|
3
3
|
$:.unshift lib unless $:.include?(lib)
|
4
|
+
|
5
|
+
require 'recipiez/version'
|
6
|
+
|
4
7
|
|
5
8
|
Gem::Specification.new do |s|
|
6
9
|
s.name = "recipiez"
|
7
|
-
s.version =
|
10
|
+
s.version = Recipiez::VERSION
|
8
11
|
s.platform = Gem::Platform::RUBY
|
9
12
|
s.authors = ["Alastair Brunton"]
|
10
13
|
s.email = ["info@simplyexcited.co.uk"]
|
11
14
|
s.homepage = "http://github.com/pyrat/deployment_recipiez"
|
12
|
-
s.summary = "
|
13
|
-
s.description = "DB Syncing, Logrotate, Apache, Thin, Basecamp, Activecollab, Monit"
|
15
|
+
s.summary = "Cap recipies for DB Syncing, Logrotate, Apache, Thin, Basecamp, Activecollab, Monit, NodeJS, Nginx"
|
16
|
+
s.description = "Cap recipies for DB Syncing, Logrotate, Apache, Thin, Basecamp, Activecollab, Monit, NodeJS, Nginx"
|
14
17
|
|
15
18
|
s.add_dependency('xml-simple')
|
16
19
|
s.add_dependency('mechanize')
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: recipiez
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 19
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 1
|
9
|
-
-
|
10
|
-
version: 0.1.
|
9
|
+
- 4
|
10
|
+
version: 0.1.4
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Alastair Brunton
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2011-
|
18
|
+
date: 2011-12-14 00:00:00 +01:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|
@@ -46,7 +46,7 @@ dependencies:
|
|
46
46
|
version: "0"
|
47
47
|
type: :runtime
|
48
48
|
version_requirements: *id002
|
49
|
-
description: DB Syncing, Logrotate, Apache, Thin, Basecamp, Activecollab, Monit
|
49
|
+
description: Cap recipies for DB Syncing, Logrotate, Apache, Thin, Basecamp, Activecollab, Monit, NodeJS, Nginx
|
50
50
|
email:
|
51
51
|
- info@simplyexcited.co.uk
|
52
52
|
executables: []
|
@@ -123,6 +123,6 @@ rubyforge_project:
|
|
123
123
|
rubygems_version: 1.3.7
|
124
124
|
signing_key:
|
125
125
|
specification_version: 3
|
126
|
-
summary:
|
126
|
+
summary: Cap recipies for DB Syncing, Logrotate, Apache, Thin, Basecamp, Activecollab, Monit, NodeJS, Nginx
|
127
127
|
test_files: []
|
128
128
|
|