-o StrictHostKeyChecking=no
inovke :'rails:db_create'
inovke :'rails:db_rollback'
task :deploy => :environment do
deploy do
invoke :'git:clone'
invoke :'deploy:link_shared_paths'
invoke :'bundle:install'
invoke :'rails:db_create' if ENV['create']
invoke :'rails:db_migrate'
invoke :'rails:assets_precompile'
invoke :'deploy:cleanup'
to :launch do
invoke :restart_application
end
end
end
task :deploy => :environment do
deploy do
to :before_hook do
end
invoke :'git:clone'
...
to :launch do
invoke :restart_application
end
to :after_hook do
end
end
end
https://github.com/d4be4st/mina-data_sync
# pulls remote to local
mina data_sync:pull
# pushes local to remote
mina data_sync:push
set :database_path, "config/database.yml"
set :remote_backup_path, 'tmp'
set :local_backup_path, -> { ENV['DATA_SYNC_BACKUP_PATH'] || 'tmp' }
# if false will only make a dump and copy it without doing restore
set :restore_data, -> { ENV['restore'] || 'true' }