edploy 2.0.0
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +4 -0
- data/Gemfile +4 -0
- data/MIT-LICENSE +92 -0
- data/README.rdoc.fast_remote_cache +48 -0
- data/Rakefile +1 -0
- data/TODO.TXT +17 -0
- data/bin/dploy +15 -0
- data/bin/dploygen +39 -0
- data/bin/dployify +29 -0
- data/edploy.gemspec +21 -0
- data/lib/capistrano/ext/mailer.rb +90 -0
- data/lib/capistrano/ext/multistage.rb +59 -0
- data/lib/capistrano/ext/output_catcher.rb +97 -0
- data/lib/capistrano/ext/output_hooks.rb +54 -0
- data/lib/capistrano/recipes/deploy/strategy/fast_remote_cache.rb +44 -0
- data/lib/capistrano/recipes/deploy/strategy/utilities/copy.rb +53 -0
- data/lib/edploy/environment_capistrano.rb +19 -0
- data/lib/edploy/recipes/apache.rb +8 -0
- data/lib/edploy/recipes/bundle_install.rb +15 -0
- data/lib/edploy/recipes/fast_remote_cache.rb +43 -0
- data/lib/edploy/recipes/fast_remote_cache_extensions.rb +11 -0
- data/lib/edploy/recipes/hooks.rb +24 -0
- data/lib/edploy/recipes/production.rb +56 -0
- data/lib/edploy/recipes/rails.rb +5 -0
- data/lib/edploy/recipes/setup_project.rb +26 -0
- data/lib/edploy/recipes/smart_deploy.rb +47 -0
- data/lib/edploy/recipes/templates.rb +60 -0
- data/lib/edploy/recipes/web_disable_enable.rb +32 -0
- data/lib/edploy.rb +17 -0
- data/lib/edployify/configuration.rb +140 -0
- data/lib/edployify/preferences.rb +176 -0
- data/lib/edployify/project.rb +69 -0
- data/lib/edployify/template.rb +84 -0
- data/lib/edployify.rb +6 -0
- data/lib/edployscripts/archive.rb +27 -0
- data/lib/edployscripts/environment_scripts.rb +47 -0
- data/lib/edployscripts/file_handling.rb +28 -0
- data/lib/edployscripts/git.rb +27 -0
- data/lib/edployscripts.rb +6 -0
- data/templates/config/edploy/copy/extract/.gitkeep +0 -0
- data/templates/config/edploy/copy/init_scripts/.gitkeep +0 -0
- data/templates/config/edploy/copy/project_files/.gitkeep +0 -0
- data/templates/config/edploy/scripts/after_deploy_setup/.gitkeep +0 -0
- data/templates/config/edploy/scripts/after_deploy_symlink/passenger/clear_file_cache.erb +7 -0
- data/templates/config/edploy/scripts/after_deploy_update_code/make_symlinks.erb +74 -0
- data/templates/config/edploy/scripts/edploygen/01_bundle_install.erb +5 -0
- data/templates/config/edploy/scripts/edploygen/01_prepare_servers.post.erb +12 -0
- data/templates/config/edploy/scripts/edploygen/02_whenever_configs.erb +36 -0
- data/templates/config/edploy/templates/passenger/activate.rb.erb +2 -0
- data/templates/config/edploy/templates/passenger/after_config.rb.erb +2 -0
- data/templates/config/edploy/templates/passenger/apache_vhost.erb.erb +107 -0
- data/templates/config/edploy/templates/passenger/config.rb.erb +3 -0
- data/templates/config/edploy/templates/passenger/deactivate.rb.erb +1 -0
- data/templates/config/edploy/whenever/generic.rb.erb +12 -0
- metadata +113 -0
@@ -0,0 +1,107 @@
|
|
1
|
+
<IfModule passenger_module>
|
2
|
+
<VirtualHost *:80>
|
3
|
+
ServerName <%%= domain.to_s %>
|
4
|
+
<%% if stage == :production %>
|
5
|
+
ServerAlias <%= application %>.*
|
6
|
+
ServerAlias *.<%= application %>.*
|
7
|
+
<%% else %>
|
8
|
+
ServerAlias <%%= passenger_log_name.to_s %>.<%= application %>.*
|
9
|
+
ServerAlias *.<%%= passenger_log_name.to_s %>.<%= application %>.*
|
10
|
+
<%% end %>
|
11
|
+
|
12
|
+
DocumentRoot "<%%= passenger_document_root.to_s %>"
|
13
|
+
PassengerAppRoot "<%%= passenger_app_root.to_s %>"
|
14
|
+
|
15
|
+
LogLevel warn
|
16
|
+
LogFormat "%{X-Forwarded-For}i %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" (%D)" combined_with_processing_time
|
17
|
+
LogFormat "%h %l %u %t \"%r\" %>s %b (%D)" common_with_processing_time
|
18
|
+
SetEnvIf Request_URI "^/haproxy\.txt$" dontlog
|
19
|
+
CustomLog "/var/log/apache2/<%= application %>-access.log" <%%= stage == :production ? "combined_with_processing_time" : "common_with_processing_time" %> env=!dontlog
|
20
|
+
ErrorLog "/var/log/apache2/<%= application %>-error.log warning"
|
21
|
+
|
22
|
+
RackEnv <%%= rails_env.to_s %>
|
23
|
+
|
24
|
+
RewriteEngine On
|
25
|
+
|
26
|
+
# if using a textfile for haproxy to check, we need this ruleset, in order to
|
27
|
+
# prevent the request for the checkfile to enter rails.
|
28
|
+
RewriteCond %{REQUEST_URI} haproxy.txt
|
29
|
+
RewriteCond %{DOCUMENT_ROOT}/haproxy.txt !-f
|
30
|
+
RewriteRule ^(.*)$ $1 [L,R=404]
|
31
|
+
|
32
|
+
# Ruleset for returning 503 to API calls when in maintenance mode
|
33
|
+
RewriteCond %{REQUEST_URI} !\.(css|jpg|png)$
|
34
|
+
RewriteCond %{REQUEST_URI} !server-status/?$
|
35
|
+
RewriteCond %{HTTP_HOST} ^api\. [NC]
|
36
|
+
RewriteCond %{DOCUMENT_ROOT}/system/maintenance.html -f
|
37
|
+
RewriteCond %{SCRIPT_FILENAME} !maintenance.html
|
38
|
+
RewriteRule ^/.*$ /system/maintenance.html [L,R=503]
|
39
|
+
|
40
|
+
# Ruleset for returning 503 to requests from search bots when in maintenance mode
|
41
|
+
RewriteCond %{REQUEST_URI} !\.(css|jpg|png)$
|
42
|
+
RewriteCond %{REQUEST_URI} !server-status/?$
|
43
|
+
RewriteCond %{HTTP_USER_AGENT} Googlebot|Googlebot-Mobile|Googlebot-Image|Mediapartners-Google|Adsbot-Google|Msnbot|Slurp|Teoma|^$ [NC]
|
44
|
+
RewriteCond %{HTTP_HOST} !^(app) [NC]
|
45
|
+
RewriteCond %{DOCUMENT_ROOT}/system/maintenance.html -f
|
46
|
+
RewriteCond %{SCRIPT_FILENAME} !maintenance.html
|
47
|
+
RewriteRule ^/.*$ /system/maintenance.html [L,R=503]
|
48
|
+
|
49
|
+
# Ruleset for redirect to maintenance page when in maintenance mode, in the case of
|
50
|
+
# AJAX requests. These requests might update only a DIV, leading to incorrect website views
|
51
|
+
# when not redirecting externally
|
52
|
+
RewriteCond %{HTTP:X-Requested-With} ^XMLHttpRequest$
|
53
|
+
RewriteCond %{DOCUMENT_ROOT}/system/maintenance.html -f
|
54
|
+
RewriteCond %{SCRIPT_FILENAME} !maintenance.html
|
55
|
+
RewriteRule ^/.*$ /system/maintenance.html [L,R]
|
56
|
+
|
57
|
+
# Ruleset for returning a normal maintenance page when in maintenance mode, to the normal
|
58
|
+
# user. We can't add 503 as the status (needs to be 200 OK), as otherwise haproxy will
|
59
|
+
# override the html page returned.
|
60
|
+
# If you add '<%= application %>' to your User Agent string, you can visit the site
|
61
|
+
# while it is in maintenance mode.
|
62
|
+
RewriteCond %{REQUEST_URI} !\.(css|jpg|png)$
|
63
|
+
RewriteCond %{REQUEST_URI} !server-status/?$
|
64
|
+
RewriteCond %{HTTP_USER_AGENT} !(<%= application %>) [NC]
|
65
|
+
RewriteCond %{DOCUMENT_ROOT}/system/maintenance.html -f
|
66
|
+
RewriteCond %{SCRIPT_FILENAME} !maintenance.html
|
67
|
+
RewriteRule ^/.*$ /system/maintenance.html [L]
|
68
|
+
|
69
|
+
<Proxy *>
|
70
|
+
AddDefaultCharset off
|
71
|
+
Order deny,allow
|
72
|
+
Allow from localhost
|
73
|
+
</Proxy>
|
74
|
+
|
75
|
+
<FilesMatch "\.(js|css)$">
|
76
|
+
ExpiresActive On
|
77
|
+
ExpiresDefault "access plus 1 year"
|
78
|
+
</FilesMatch>
|
79
|
+
|
80
|
+
<FilesMatch "\.(ico|gif|jpe?g|png)$">
|
81
|
+
ExpiresActive On
|
82
|
+
ExpiresDefault "access plus 1 year"
|
83
|
+
FileETag INode MTime
|
84
|
+
</FilesMatch>
|
85
|
+
|
86
|
+
<%% if [ :staging, :tryout ].include?(stage.to_sym) %>
|
87
|
+
UserDir disabled
|
88
|
+
UserDir enabled tl
|
89
|
+
UserDir public_html
|
90
|
+
|
91
|
+
<Location "/~tl">
|
92
|
+
PassengerEnabled off
|
93
|
+
</Location>
|
94
|
+
|
95
|
+
<directory "public_html">
|
96
|
+
Options +Indexes
|
97
|
+
</directory>
|
98
|
+
<%% end %>
|
99
|
+
|
100
|
+
<Directory "<%%= passenger_document_root.to_s %>">
|
101
|
+
Order allow,deny
|
102
|
+
Allow from all
|
103
|
+
AddOutputFilterByType DEFLATE text/html
|
104
|
+
</Directory>
|
105
|
+
</VirtualHost>
|
106
|
+
</IfModule>
|
107
|
+
|
@@ -0,0 +1 @@
|
|
1
|
+
sudo "a2dissite #{application}"
|
@@ -0,0 +1,12 @@
|
|
1
|
+
# This crontab definition file is not used directly! It is a base definition for all *.rb defs
|
2
|
+
# only put crontabs here that should run on ALL servers
|
3
|
+
|
4
|
+
env :MAILTO, '<%= notify_email %>'
|
5
|
+
set :output, {:standard => nil}
|
6
|
+
set :path, "<%= deploy_to %>/current"
|
7
|
+
|
8
|
+
set :job_template, "rvm_silence_logging=1 /bin/bash -l -c ':job'"
|
9
|
+
|
10
|
+
job_type :debug_rake, "cd :path && STAGE=:stage RAILS_ENV=:environment bundle exec rake :task --trace :output"
|
11
|
+
job_type :rake, "cd :path && STAGE=:stage RAILS_ENV=:environment bundle exec rake :task --silent :output"
|
12
|
+
job_type :command_with_path, "cd :path ; :task"
|
metadata
ADDED
@@ -0,0 +1,113 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: edploy
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 2.0.0
|
5
|
+
prerelease:
|
6
|
+
platform: ruby
|
7
|
+
authors:
|
8
|
+
- Ewout Vonk
|
9
|
+
autorequire:
|
10
|
+
bindir: bin
|
11
|
+
cert_chain: []
|
12
|
+
date: 2012-02-07 00:00:00.000000000Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
15
|
+
name: capistrano
|
16
|
+
requirement: &70279503919100 !ruby/object:Gem::Requirement
|
17
|
+
none: false
|
18
|
+
requirements:
|
19
|
+
- - ! '>='
|
20
|
+
- !ruby/object:Gem::Version
|
21
|
+
version: '0'
|
22
|
+
type: :runtime
|
23
|
+
prerelease: false
|
24
|
+
version_requirements: *70279503919100
|
25
|
+
description: A gem which allows for fast, easy and efficient deploys with capistrano
|
26
|
+
email:
|
27
|
+
- dev@ewout.to
|
28
|
+
executables:
|
29
|
+
- dploy
|
30
|
+
- dploygen
|
31
|
+
- dployify
|
32
|
+
extensions: []
|
33
|
+
extra_rdoc_files: []
|
34
|
+
files:
|
35
|
+
- .gitignore
|
36
|
+
- Gemfile
|
37
|
+
- MIT-LICENSE
|
38
|
+
- README.rdoc.fast_remote_cache
|
39
|
+
- Rakefile
|
40
|
+
- TODO.TXT
|
41
|
+
- bin/dploy
|
42
|
+
- bin/dploygen
|
43
|
+
- bin/dployify
|
44
|
+
- edploy.gemspec
|
45
|
+
- lib/capistrano/ext/mailer.rb
|
46
|
+
- lib/capistrano/ext/multistage.rb
|
47
|
+
- lib/capistrano/ext/output_catcher.rb
|
48
|
+
- lib/capistrano/ext/output_hooks.rb
|
49
|
+
- lib/capistrano/recipes/deploy/strategy/fast_remote_cache.rb
|
50
|
+
- lib/capistrano/recipes/deploy/strategy/utilities/copy.rb
|
51
|
+
- lib/edploy.rb
|
52
|
+
- lib/edploy/environment_capistrano.rb
|
53
|
+
- lib/edploy/recipes/apache.rb
|
54
|
+
- lib/edploy/recipes/bundle_install.rb
|
55
|
+
- lib/edploy/recipes/fast_remote_cache.rb
|
56
|
+
- lib/edploy/recipes/fast_remote_cache_extensions.rb
|
57
|
+
- lib/edploy/recipes/hooks.rb
|
58
|
+
- lib/edploy/recipes/production.rb
|
59
|
+
- lib/edploy/recipes/rails.rb
|
60
|
+
- lib/edploy/recipes/setup_project.rb
|
61
|
+
- lib/edploy/recipes/smart_deploy.rb
|
62
|
+
- lib/edploy/recipes/templates.rb
|
63
|
+
- lib/edploy/recipes/web_disable_enable.rb
|
64
|
+
- lib/edployify.rb
|
65
|
+
- lib/edployify/configuration.rb
|
66
|
+
- lib/edployify/preferences.rb
|
67
|
+
- lib/edployify/project.rb
|
68
|
+
- lib/edployify/template.rb
|
69
|
+
- lib/edployscripts.rb
|
70
|
+
- lib/edployscripts/archive.rb
|
71
|
+
- lib/edployscripts/environment_scripts.rb
|
72
|
+
- lib/edployscripts/file_handling.rb
|
73
|
+
- lib/edployscripts/git.rb
|
74
|
+
- templates/config/edploy/copy/extract/.gitkeep
|
75
|
+
- templates/config/edploy/copy/init_scripts/.gitkeep
|
76
|
+
- templates/config/edploy/copy/project_files/.gitkeep
|
77
|
+
- templates/config/edploy/scripts/after_deploy_setup/.gitkeep
|
78
|
+
- templates/config/edploy/scripts/after_deploy_symlink/passenger/clear_file_cache.erb
|
79
|
+
- templates/config/edploy/scripts/after_deploy_update_code/make_symlinks.erb
|
80
|
+
- templates/config/edploy/scripts/edploygen/01_bundle_install.erb
|
81
|
+
- templates/config/edploy/scripts/edploygen/01_prepare_servers.post.erb
|
82
|
+
- templates/config/edploy/scripts/edploygen/02_whenever_configs.erb
|
83
|
+
- templates/config/edploy/templates/passenger/activate.rb.erb
|
84
|
+
- templates/config/edploy/templates/passenger/after_config.rb.erb
|
85
|
+
- templates/config/edploy/templates/passenger/apache_vhost.erb.erb
|
86
|
+
- templates/config/edploy/templates/passenger/config.rb.erb
|
87
|
+
- templates/config/edploy/templates/passenger/deactivate.rb.erb
|
88
|
+
- templates/config/edploy/whenever/generic.rb.erb
|
89
|
+
homepage: https://github.com/ewoutvonk/edploy
|
90
|
+
licenses: []
|
91
|
+
post_install_message:
|
92
|
+
rdoc_options: []
|
93
|
+
require_paths:
|
94
|
+
- lib
|
95
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
96
|
+
none: false
|
97
|
+
requirements:
|
98
|
+
- - ! '>='
|
99
|
+
- !ruby/object:Gem::Version
|
100
|
+
version: '0'
|
101
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
102
|
+
none: false
|
103
|
+
requirements:
|
104
|
+
- - ! '>='
|
105
|
+
- !ruby/object:Gem::Version
|
106
|
+
version: '0'
|
107
|
+
requirements: []
|
108
|
+
rubyforge_project: edploy
|
109
|
+
rubygems_version: 1.8.10
|
110
|
+
signing_key:
|
111
|
+
specification_version: 3
|
112
|
+
summary: A gem which allows for fast, easy and efficient deploys with capistrano
|
113
|
+
test_files: []
|