Last active
December 15, 2015 06:29
-
-
Save grahamb/5216573 to your computer and use it in GitHub Desktop.
vm.rb
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
| role :app, "icat-graham-canvas.its.sfu.ca" | |
| role :db, "icat-graham-canvas.its.sfu.ca", :primary => true | |
| set :scm, :none | |
| set :repository, "." | |
| set :deploy_via, :copy | |
| set :rails_env, "production" | |
| ssh_options[:keys] = [File.join(ENV["HOME"], ".ssh", "id_rsa")] | |
| namespace :dev do | |
| desc "Install hirb gem" | |
| task "install_hirb" do | |
| gemline = 'gem "hirb"' | |
| run "cd #{latest_release} && echo '#{gemline}' >> Gemfile && rm #{latest_release}/Gemfile.lock ; bundle install --no-deployment" | |
| end | |
| end | |
| namespace :canvas do | |
| # override the copy_config step | |
| desc "Copy config files from /mnt/data/canvasconfig/config" | |
| task :copy_config do | |
| run "cp #{shared_path}/config/*.yml #{latest_release}/config" | |
| end | |
| # override the log_deploy step | |
| task :log_deploy do ; end | |
| task :update_remote do | |
| dev.install_hirb | |
| copy_config | |
| clone_qtimigrationtool | |
| deploy.migrate | |
| load_notifications | |
| restart_jobs | |
| end | |
| end | |
| # override the disable/enable web steps | |
| namespace :deploy do | |
| namespace :web do | |
| task :disable do ; end | |
| task :enable do ; end | |
| end | |
| end | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment