easy-deployment 0.4.1 → 0.4.2
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +38 -1
- data/lib/easy-deployment/version.rb +1 -1
- data/lib/easy/deployment/apache.rb +3 -1
- metadata +3 -9
data/README.md
CHANGED
@@ -22,6 +22,43 @@ Run:
|
|
22
22
|
|
23
23
|
$ rails g easy:deployment
|
24
24
|
|
25
|
+
## Integration
|
26
|
+
|
27
|
+
### Apache
|
28
|
+
|
29
|
+
Automatically setup an Apache V-Host, and reload apache2:
|
30
|
+
|
31
|
+
If you are running under Apache (with passenger or otherwise), and the sites-available
|
32
|
+
directory is writable by your deploy user. easy-deployment can automatically write a v-host config
|
33
|
+
to that directory and perform a soft reload (graceful) of apache2 to automatically configure your site.
|
34
|
+
|
35
|
+
Add to deploy.rb
|
36
|
+
|
37
|
+
require "easy/deployment/apache"
|
38
|
+
|
39
|
+
Customise the vhost file within `config/deploy/<stage>/apache/<app>.conf`
|
40
|
+
If necessary, you can set the path to the apache2ctl binary via:
|
41
|
+
|
42
|
+
set :apachectl_bin, "/usr/sbin/apachectl"
|
43
|
+
|
44
|
+
This assumes your deploy user has access to run the apachectl command with sudo privileges
|
45
|
+
|
46
|
+
### Logrotate
|
47
|
+
|
48
|
+
Automatically configure logrotate for your application logfile:
|
49
|
+
If you have logrotate installed and /etc/logrotate.d is writable by your deploy user, simply
|
50
|
+
|
51
|
+
require "easy/deployment/logrotate"
|
52
|
+
|
53
|
+
within your deploy.rb to have a logrotate config automatically written
|
54
|
+
|
55
|
+
### Whenever
|
56
|
+
|
57
|
+
If you use the whenever gem to manage application crontabs, automatically include the capistrano
|
58
|
+
hooks to run whenever each deploy via:
|
59
|
+
|
60
|
+
require "easy/deployment/whenever"
|
61
|
+
|
25
62
|
## Contributing
|
26
63
|
|
27
64
|
1. Fork it
|
@@ -33,4 +70,4 @@ Run:
|
|
33
70
|
## Copyright
|
34
71
|
|
35
72
|
Copyright (c) 2012 Abletech
|
36
|
-
http://www.abletech.co.nz/
|
73
|
+
http://www.abletech.co.nz/
|
@@ -6,6 +6,8 @@ Capistrano::Configuration.instance(:must_exist).load do
|
|
6
6
|
'true' == capture("if [ -e #{full_path} ]; then echo 'true'; fi").strip
|
7
7
|
end
|
8
8
|
|
9
|
+
set :apachectl_bin, "apache2ctl"
|
10
|
+
|
9
11
|
namespace :apache do
|
10
12
|
desc "Configure this site, test the configuration & gracefully reload the Apache configuration"
|
11
13
|
task :configure_and_reload, :roles => :web, :except => { :no_release => true } do
|
@@ -47,7 +49,7 @@ Capistrano::Configuration.instance(:must_exist).load do
|
|
47
49
|
[:stop, :start, :restart, :graceful, :configtest].each do |action|
|
48
50
|
desc (action == :graceful ? "Restart Apache gracefully" : "#{action.to_s.capitalize} Apache")
|
49
51
|
task action, :roles => :web do
|
50
|
-
run "sudo
|
52
|
+
run "sudo #{apachectl_bin} #{action.to_s}"
|
51
53
|
end
|
52
54
|
end
|
53
55
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: easy-deployment
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -12,7 +12,7 @@ authors:
|
|
12
12
|
autorequire:
|
13
13
|
bindir: bin
|
14
14
|
cert_chain: []
|
15
|
-
date:
|
15
|
+
date: 2013-01-09 00:00:00.000000000 Z
|
16
16
|
dependencies:
|
17
17
|
- !ruby/object:Gem::Dependency
|
18
18
|
name: rails
|
@@ -159,21 +159,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
159
159
|
- - ! '>='
|
160
160
|
- !ruby/object:Gem::Version
|
161
161
|
version: '0'
|
162
|
-
segments:
|
163
|
-
- 0
|
164
|
-
hash: -3765097199818063261
|
165
162
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
166
163
|
none: false
|
167
164
|
requirements:
|
168
165
|
- - ! '>='
|
169
166
|
- !ruby/object:Gem::Version
|
170
167
|
version: '0'
|
171
|
-
segments:
|
172
|
-
- 0
|
173
|
-
hash: -3765097199818063261
|
174
168
|
requirements: []
|
175
169
|
rubyforge_project:
|
176
|
-
rubygems_version: 1.8.
|
170
|
+
rubygems_version: 1.8.23
|
177
171
|
signing_key:
|
178
172
|
specification_version: 3
|
179
173
|
summary: Gem for encapsulating Abletech's deployment practices
|