yyyc514-dwell 0.1.99 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/dwell/recipes/apache.rb +5 -5
- data/lib/dwell/recipes/passenger.rb +3 -3
- data/lib/dwell/recipes/postfix.rb +13 -0
- metadata +2 -1
data/lib/dwell/recipes/apache.rb
CHANGED
@@ -16,20 +16,20 @@ Capistrano::Configuration.instance(:must_exist).load do
|
|
16
16
|
set :apache_ssl_forward_all, false
|
17
17
|
|
18
18
|
desc "Install Apache"
|
19
|
-
task :install do
|
19
|
+
task :install, :roles => :web do
|
20
20
|
sudo "apt-get install apache2 apache2-threaded-dev -y"
|
21
21
|
dwell1.record_install "apache2"
|
22
22
|
end
|
23
23
|
|
24
24
|
# shorter form
|
25
|
-
task :setup do
|
25
|
+
task :setup, :roles => :web do
|
26
26
|
site.setup
|
27
27
|
end
|
28
28
|
|
29
29
|
namespace :site do
|
30
30
|
|
31
31
|
desc "Configure site for apache"
|
32
|
-
task :setup do
|
32
|
+
task :setup, :roles => :web do
|
33
33
|
set :apache_server_name, domain unless apache_server_name
|
34
34
|
server_aliases = []
|
35
35
|
server_aliases << "www.#{apache_server_name}" unless apache_server_name =~ /^www\./
|
@@ -58,13 +58,13 @@ Capistrano::Configuration.instance(:must_exist).load do
|
|
58
58
|
end
|
59
59
|
|
60
60
|
desc "Disable this site"
|
61
|
-
task :disable do
|
61
|
+
task :disable, :roles => :web do
|
62
62
|
sudo "a2dissite #{application}"
|
63
63
|
end
|
64
64
|
|
65
65
|
end
|
66
66
|
|
67
|
-
task :copy_certs do
|
67
|
+
task :copy_certs, :roles => :web do
|
68
68
|
Dir.glob("config/dwell/ssl/*").each do |file|
|
69
69
|
basename=File.basename(file)
|
70
70
|
dwell1.sudo_upload file, "/etc/ssl/certs/#{basename}" if file=~/.crt/
|
@@ -11,13 +11,13 @@ Capistrano::Configuration.instance(:must_exist).load do
|
|
11
11
|
set :passenger_ruby, "/usr/bin/ruby1.8"
|
12
12
|
|
13
13
|
desc "Install Passenger Apache 2 module"
|
14
|
-
task :install_passenger_module do
|
14
|
+
task :install_passenger_module, :roles => :app do
|
15
15
|
dwell1.sudo_with_input "passenger-install-apache2-module", /enter/i, "\n"
|
16
16
|
dwell1.record_install "apache2_mod_passenger"
|
17
17
|
end
|
18
18
|
|
19
19
|
desc "Setup the configuration for mod_massenger"
|
20
|
-
task :setup do
|
20
|
+
task :setup, :roles => :app do
|
21
21
|
set :passenger_ruby, "/opt/ruby-enterprise/bin/ruby" if which_ruby==:enterprise
|
22
22
|
run "gem list --local | grep passenger" do |channel, stream, data|
|
23
23
|
if data.match(/passenger \(([^ ,)]*)/)
|
@@ -35,7 +35,7 @@ Capistrano::Configuration.instance(:must_exist).load do
|
|
35
35
|
end
|
36
36
|
|
37
37
|
desc "Install Passenger"
|
38
|
-
task :install do
|
38
|
+
task :install, :roles => :app do
|
39
39
|
install_passenger_module
|
40
40
|
setup
|
41
41
|
end
|
@@ -0,0 +1,13 @@
|
|
1
|
+
Capistrano::Configuration.instance(:must_exist).load do
|
2
|
+
namespace :dwell do
|
3
|
+
namespace :postfix do
|
4
|
+
|
5
|
+
desc "Install Postfix"
|
6
|
+
task :install do
|
7
|
+
sudo "DEBCONF_TERSE='yes' DEBIAN_FRONTEND=noninteractive apt-get install postfix -y"
|
8
|
+
dwell1.record_install "postfix"
|
9
|
+
end
|
10
|
+
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: yyyc514-dwell
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Robert Bousquet
|
@@ -55,6 +55,7 @@ files:
|
|
55
55
|
- lib/dwell/recipes/mysql/helper.rb
|
56
56
|
- lib/dwell/recipes/mysql.rb
|
57
57
|
- lib/dwell/recipes/passenger.rb
|
58
|
+
- lib/dwell/recipes/postfix.rb
|
58
59
|
- lib/dwell/recipes/rails
|
59
60
|
- lib/dwell/recipes/rails/app.rb
|
60
61
|
- lib/dwell/recipes/rails/base.rb
|