Sha256: f6b39a97036d24382d82c4452abdda9099b1cd9347bf7db8f47647f65e3fbeeb
Contents?: true
Size: 1.71 KB
Versions: 32
Compression:
Stored size: 1.71 KB
Contents
# # Provides tasks to turn on maintenance pages whilst the build is being repaired. # # The maintenance files must exist in # public/maintenance # # And Apache must be configured to use them. E.g. # # Alias /maintenance @DEPLOY_TO@/shared/system/maintenance # <Directory "@DEPLOY_TO@/shared/system/maintenance/"> # Options FollowSymLinks # AllowOverride None # Order allow,deny # Allow from all # </Directory> # # RewriteRule ^/maintenance/.*\.(png|ico|jpg|gif) - [L] # # RewriteCond @DEPLOY_TO@/shared/system/maintenance/maintenance.html -f # RewriteCond %{SCRIPT_FILENAME} !maintenance.html # RewriteRule ^.*$ @DEPLOY_TO@/shared/system/maintenance/maintenance.html [L] # namespace :web do desc <<-DESC Present a maintenance page to visitors. Disables your application's web \ interface by writing a "maintenance-en.html" file to each web server. The \ servers must be configured to detect the presence of this file, and if \ it is present, always display it instead of performing the request. The maintenance html pages are copied to shared/system/maintenance so they \ can still display when things go wrong in the release folder. DESC task :disable, :roles => :web, :except => { :no_release => true } do run "cp -raf #{current_path}/public/maintenance/ #{deploy_to}/shared/system/" end desc <<-DESC Makes the application web-accessible again. Removes the \ "maintenance.html" page generated by deploy:web:disable, which (if your \ web servers are configured correctly) will make your application \ web-accessible again. DESC task :enable, :roles => :web, :except => { :no_release => true } do run "rm -rf #{deploy_to}/shared/system/maintenance" end end
Version data entries
32 entries across 32 versions & 1 rubygems