Last active
August 29, 2015 13:56
-
-
Save charlycoste/9076565 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
namespace :db do | |
desc 'Loads one of the backup made with the db:export:remote task' | |
task :import_to_local do | |
end | |
desc 'Creates a backup from a remote database server' | |
task :backup, :roles => :db do | |
end | |
desc 'Create a backup from your local instance' | |
task :backup_local do | |
end | |
end |
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
namespace :ezpublish do | |
namespace :autoloads do | |
desc 'Generates autoloads (extensions and kernel overrides)' | |
task :generate do | |
end | |
end | |
namespace :cache do | |
desc 'Clear caches the way it is configured in ezpublish.rb' | |
task :clear, :roles => :web, :only => { :primary => true } do | |
end | |
end | |
namespace :dev do | |
desc 'Check if there are any changes on your local installation based on what your scm knows' | |
task :local_check do | |
end | |
end | |
namespace :settings do | |
desc 'Makes some file level operations if needed (rename, replace)' | |
task :deploy do | |
end | |
desc '[local] Makes some file level operations if needed (rename, replace)' | |
task :deploy_locally do | |
end | |
end | |
namespace :var do | |
desc 'Creates the needed folder within your remote(s) var directories' | |
task :init_shared do | |
end | |
desc '[internal] Creates release directories' | |
task :init_release do | |
end | |
desc 'Link .../shared/var into ../releases/[latest_release]/var' | |
task :link, :roles => :web do | |
end | |
desc 'Sync your var directory with a remote one' | |
task :sync_to_local, :roles => :web, :only => { :primary => true } do | |
end | |
desc 'Sync your a remote var folder with local datas' | |
task :sync_to_remote, :roles => :web, :only => { :primary => true } do | |
end | |
desc 'Generates autoloads (extensions and kernel overrides)' | |
task :generate, :roles => :web do | |
end | |
end | |
end |
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
set :alcapon_path, alcapon_path | |
set :ezpublish_version, ezpublish_version | |
# cap2 differentiator | |
load 'deploy' if respond_to?(:namespace) | |
Dir['vendor/gems/*/recipes/*.rb','vendor/plugins/*/recipes/*.rb'].each { |plugin| load(plugin) } | |
load Gem.find_files('capez.rb').first.to_s | |
set :stage_dir, '#{alcapon_path}/config/deploy' | |
Dir['#{alcapon_path}/config/*.rb'].each { |recipe| load(recipe) } |
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
# Comment this if you don't want to use a multistage setup | |
set :stages, %w(devel production ) | |
#set :default_stage, "devel" | |
require 'capistrano/ext/multistage' | |
set :application, "myapp" | |
set :repository, "[email protected]:username/myapp.git" | |
set :deploy_to, "/var/www/\#{application}" | |
# The user connecting your server through ssh | |
set :user, "deploy" | |
# The default branch used (can be overridden on multistage setup) | |
set :branch, "master" | |
# Need if you want to deploy somewhere where sudo is needed | |
default_run_options[:pty] = true | |
# Set debug level to IMPORTANT only | |
# Comment if you want to get more debug outputs | |
logger.level = Logger::IMPORTANT | |
# Override default feature (not needed for eZ Publish) | |
# If turned on, you will get a warning during deployment but it should not be aborted | |
set :normalize_asset_timestamps, false | |
# Use this to use your ssh keys | |
# (you might need to run ssh-add /path/to/your/deploy_key before) | |
ssh_options[:forward_agent] = true | |
# Or if you want to use a specific key | |
#ssh_options[:keys] = %w(/home/username/.ssh/id_rsa) | |
# Or: `accurev`, `bzr`, `cvs`, `darcs`, `git`, `mercurial`, `perforce`, `subversion` or `none` | |
set :scm, :git | |
# Comment this if you don't use submodules | |
set :git_enable_submodules, 1 | |
# Prevents you from cloning the whole rep. each deploy but your remote servers | |
# must be able to get connected to your scm server | |
set :deploy_via, :remote_cache | |
set :copy_exclude, [ '.git' ] | |
# Your Primary HTTP server | |
# (Use config/deploy/*.rb files instead if you need a multisage setup) | |
role :web, "domain.com", :primary => true | |
# Another HTTP server, for instanced when using a clustered mode | |
#role :web, "server2" | |
#role :db, "your primary db-server here", :primary => true, :no_release => true # This is where Rails migrations will run | |
#role :db, "your slave db-server here", :no_release => true |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment