recipiez 0.0.4 → 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
- data/recipes/apache.rb +9 -1
- data/recipes/logrotate.rb +6 -1
- data/recipes/templates/logrotate.erb +1 -1
- data/recipes/templates/passenger_vhost.erb +3 -0
- data/recipes/templates/php_vhost.erb +11 -3
- data/recipiez.gemspec +1 -1
- metadata +65 -36
data/recipes/apache.rb
CHANGED
@@ -17,9 +17,17 @@ Capistrano::Configuration.instance(true).load do
|
|
17
17
|
desc "PHP Vhost Setup"
|
18
18
|
task :php_vhost do
|
19
19
|
|
20
|
-
unless
|
20
|
+
unless exists? :apache_port
|
21
21
|
set :apache_port, '80'
|
22
22
|
end
|
23
|
+
|
24
|
+
unless exists? :allowed_ips
|
25
|
+
set :allowed_ips, []
|
26
|
+
end
|
27
|
+
|
28
|
+
unless exists? :server_aliases
|
29
|
+
set :server_aliases, []
|
30
|
+
end
|
23
31
|
|
24
32
|
logger.info "generating .conf file"
|
25
33
|
logger.info "placing #{application}.conf on remote server"
|
data/recipes/logrotate.rb
CHANGED
@@ -2,7 +2,12 @@ Capistrano::Configuration.instance(true).load do
|
|
2
2
|
|
3
3
|
namespace :logrotate do
|
4
4
|
desc "Configures logrotate for the application"
|
5
|
-
task :configure, :roles => :app do
|
5
|
+
task :configure, :roles => [:app, :web] do
|
6
|
+
|
7
|
+
unless exists? :log_directory
|
8
|
+
set :log_directory, 'log'
|
9
|
+
end
|
10
|
+
|
6
11
|
generated = render('logrotate', binding)
|
7
12
|
puts generated
|
8
13
|
put generated, "#{application}"
|
@@ -2,6 +2,9 @@
|
|
2
2
|
ServerName <%= app_domain %>
|
3
3
|
ServerAlias www.<%= app_domain %>
|
4
4
|
|
5
|
+
CustomLog /var/log/apache2/<%= app_domain %>-access.log combined
|
6
|
+
ErrorLog /var/log/apache2/<%= app_domain %>-error.log
|
7
|
+
|
5
8
|
DocumentRoot <%= deploy_to %>/current/public
|
6
9
|
RailsEnv <%= rails_env %>
|
7
10
|
|
@@ -1,12 +1,20 @@
|
|
1
|
-
<VirtualHost
|
1
|
+
<VirtualHost *:80>
|
2
2
|
ServerName <%= app_domain %>
|
3
|
-
|
3
|
+
<% if server_aliases.length > 0 %>
|
4
|
+
ServerAlias <%= server_aliases.join(" ") %>
|
5
|
+
<% end %>
|
6
|
+
|
7
|
+
CustomLog /var/log/apache2/<%= app_domain %>-access.log combined
|
8
|
+
ErrorLog /var/log/apache2/<%= app_domain %>-error.log
|
4
9
|
|
5
10
|
DocumentRoot <%= deploy_to %>/current/public
|
6
11
|
|
7
12
|
<Directory <%= deploy_to %>/current/public>
|
8
13
|
AllowOverride all
|
9
|
-
|
14
|
+
<% if allowed_ips.length > 0 %>
|
15
|
+
Allow from <%= allowed_ips.join(" ") %>
|
16
|
+
<% end %>
|
17
|
+
Options -Indexes
|
10
18
|
</Directory>
|
11
19
|
|
12
20
|
</VirtualHost>
|
data/recipiez.gemspec
CHANGED
metadata
CHANGED
@@ -1,45 +1,61 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: recipiez
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
5
|
-
prerelease:
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
hash: 21
|
5
|
+
prerelease: false
|
6
|
+
segments:
|
7
|
+
- 0
|
8
|
+
- 0
|
9
|
+
- 5
|
10
|
+
version: 0.0.5
|
6
11
|
platform: ruby
|
7
|
-
authors:
|
12
|
+
authors:
|
8
13
|
- Alastair Brunton
|
9
14
|
autorequire:
|
10
15
|
bindir: bin
|
11
16
|
cert_chain: []
|
12
|
-
|
13
|
-
|
14
|
-
|
17
|
+
|
18
|
+
date: 2011-10-06 00:00:00 +01:00
|
19
|
+
default_executable:
|
20
|
+
dependencies:
|
21
|
+
- !ruby/object:Gem::Dependency
|
15
22
|
name: xml-simple
|
16
|
-
|
23
|
+
prerelease: false
|
24
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
17
25
|
none: false
|
18
|
-
requirements:
|
19
|
-
- -
|
20
|
-
- !ruby/object:Gem::Version
|
21
|
-
|
26
|
+
requirements:
|
27
|
+
- - ">="
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
hash: 3
|
30
|
+
segments:
|
31
|
+
- 0
|
32
|
+
version: "0"
|
22
33
|
type: :runtime
|
23
|
-
|
24
|
-
|
25
|
-
- !ruby/object:Gem::Dependency
|
34
|
+
version_requirements: *id001
|
35
|
+
- !ruby/object:Gem::Dependency
|
26
36
|
name: mechanize
|
27
|
-
|
37
|
+
prerelease: false
|
38
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
28
39
|
none: false
|
29
|
-
requirements:
|
30
|
-
- -
|
31
|
-
- !ruby/object:Gem::Version
|
32
|
-
|
40
|
+
requirements:
|
41
|
+
- - ">="
|
42
|
+
- !ruby/object:Gem::Version
|
43
|
+
hash: 3
|
44
|
+
segments:
|
45
|
+
- 0
|
46
|
+
version: "0"
|
33
47
|
type: :runtime
|
34
|
-
|
35
|
-
version_requirements: *2157544400
|
48
|
+
version_requirements: *id002
|
36
49
|
description: DB Syncing, Logrotate, Apache, Thin, Basecamp, Activecollab, Monit
|
37
|
-
email:
|
50
|
+
email:
|
38
51
|
- info@simplyexcited.co.uk
|
39
52
|
executables: []
|
53
|
+
|
40
54
|
extensions: []
|
55
|
+
|
41
56
|
extra_rdoc_files: []
|
42
|
-
|
57
|
+
|
58
|
+
files:
|
43
59
|
- .gitignore
|
44
60
|
- History.txt
|
45
61
|
- MIT-LICENSE
|
@@ -70,28 +86,41 @@ files:
|
|
70
86
|
- recipes/thin.rb
|
71
87
|
- recipes/tolk.rb
|
72
88
|
- recipiez.gemspec
|
89
|
+
has_rdoc: true
|
73
90
|
homepage: http://github.com/pyrat/deployment_recipiez
|
74
91
|
licenses: []
|
92
|
+
|
75
93
|
post_install_message:
|
76
94
|
rdoc_options: []
|
77
|
-
|
95
|
+
|
96
|
+
require_paths:
|
78
97
|
- lib
|
79
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
98
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
80
99
|
none: false
|
81
|
-
requirements:
|
82
|
-
- -
|
83
|
-
- !ruby/object:Gem::Version
|
84
|
-
|
85
|
-
|
100
|
+
requirements:
|
101
|
+
- - ">="
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
hash: 3
|
104
|
+
segments:
|
105
|
+
- 0
|
106
|
+
version: "0"
|
107
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
86
108
|
none: false
|
87
|
-
requirements:
|
88
|
-
- -
|
89
|
-
- !ruby/object:Gem::Version
|
109
|
+
requirements:
|
110
|
+
- - ">="
|
111
|
+
- !ruby/object:Gem::Version
|
112
|
+
hash: 25
|
113
|
+
segments:
|
114
|
+
- 1
|
115
|
+
- 3
|
116
|
+
- 1
|
90
117
|
version: 1.3.1
|
91
118
|
requirements: []
|
119
|
+
|
92
120
|
rubyforge_project:
|
93
|
-
rubygems_version: 1.
|
121
|
+
rubygems_version: 1.3.7
|
94
122
|
signing_key:
|
95
123
|
specification_version: 3
|
96
124
|
summary: Collection of capistrano recipies which do good things.
|
97
125
|
test_files: []
|
126
|
+
|