Created
November 28, 2009 20:11
-
-
Save sagmor/244632 to your computer and use it in GitHub Desktop.
Cake PHP Capfile example
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| load 'deploy' if respond_to?(:namespace) # cap2 differentiator | |
| load 'app/config/deploy' | |
| namespace :deploy do | |
| task :restart do | |
| # How to restart Your Server | |
| end | |
| task :finalize_update do | |
| ['secret','database'].each do |config| | |
| run "ln -s #{shared_path}/config/#{config}.php #{release_path}/app/config/#{config}.php" | |
| end | |
| run "chmod -R a+w #{release_path}/app/tmp" | |
| run "rm -rf #{release_path}/app/webroot/files" | |
| run "ln -s #{shared_path}/files #{release_path}/app/webroot/files" | |
| run "rm #{release_path}/{.htaccess,app/.htaccess,app/webroot/.htaccess}" | |
| end | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| set :application, "APP_NAME" | |
| set :user, 'SERVER_USER_NAME' | |
| default_run_options[:pty] = true | |
| set :scm, "git" | |
| set :repository, "GITREPO" | |
| set :branch, "master" | |
| set :deploy_via, :remote_cache | |
| set :deploy_to, '/ROUTE/TO/APP' | |
| set :use_sudo, false | |
| role :app, "SERVER_ADDRES" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment