Created
July 31, 2012 04:26
-
-
Save mattfordham/3213612 to your computer and use it in GitHub Desktop.
This file contains 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
# The will tell Capistrano to run the custom "create_symlinks" and "set_permissions" tasks after running the normal "deploy" task | |
after "deploy", "deploy:create_symlinks", "deploy:set_permissions" | |
# Override and add some deploy tasks in the "deploy namespace" | |
namespace :deploy do | |
desc "This is here to override the original :restart" | |
task :restart, :roles => :app do | |
# do nothing but override the default | |
end | |
desc "Create symlinks to shared data such as uploaded images" | |
task :create_symlinks, :roles => :app do | |
run "ln -s #{deploy_to}/#{shared_dir}/images #{current_release}/images" | |
run "ln -s #{deploy_to}/#{shared_dir}/database.php #{current_release}/system/expressionengine/config/database.php" | |
end | |
desc "Set the correct permissions for the config files and cache folder" | |
task :set_permissions, :roles => :app do | |
run "chmod 666 #{current_release}/index.php" | |
run "chmod 777 #{current_release}/system/expressionengine/cache/" | |
run "chmod 666 #{current_release}/system/expressionengine/config/config.php" | |
run "chmod 666 #{current_release}/system/expressionengine/config/database.php" | |
run "chmod 777 #{current_release}/system/expressionengine/templates/" | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment