Sha256: 2f6b05c3b995cf2abe0bedf311bce6ce2f18972cbe5bc94aeee5527a623b0b15

Contents?: true

Size: 1.98 KB

Versions: 6

Compression:

Stored size: 1.98 KB

Contents

set :application, "nesta"
set :repository, "https://github.com/gma/nesta.git"

# Set :user if you want to connect (via ssh) to your server using a
# different username. You will also need to include the user in :domain
# (see below).
#
#set :user, "deploy"
#set :domain, "#{user}@example.com"
set :domain, "example.com"

set :deploy_to, "/var/apps/#{application}"

# ============================================================================
# You probably don't need to worry about anything beneath this point...
# ============================================================================

require "tempfile"
require "vlad"

namespace :vlad do
  remote_task :config_yml do
    put "#{shared_path}/config.yml", "vlad.config.yml" do
      File.open(File.join(File.dirname(__FILE__), "config.yml")).read
    end
  end
  
  task :setup do
    Rake::Task["vlad:config_yml"].invoke
  end
  
  remote_task :symlink_config_yml do
    run "ln -s #{shared_path}/config.yml #{current_path}/config/config.yml"
  end
  
  remote_task :symlink_attachments do
    run "ln -s #{shared_path}/content/attachments #{current_path}/public/attachments"
  end
  
  task :update do
    Rake::Task["vlad:symlink_config_yml"].invoke
    Rake::Task["vlad:symlink_attachments"].invoke
  end

  remote_task :bundle do
    run "cd #{current_path} && sudo bundle install --without development test"
  end
  
  # Depending on how you host Nesta, you might want to swap :start_app
  # with :start below. The :start_app task will tell your application
  # server (e.g. Passenger) to restart once your new code is deployed by
  # :update. Passenger is the default app server; tell Vlad that you're
  # using a different app server in the call to Vlad.load in Rakefile.
  #
  desc "Deploy the code and restart the server"
  task :deploy => [:update, :start_app]

  # If you use bundler to manage the installation of gems on your server
  # you can use this definition of the deploy task instead:
  #
  # task :deploy => [:update, :bundle, :start_app]
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
nesta-0.18.0 config/deploy.rb.sample
nesta-0.17.0 config/deploy.rb.sample
nesta-0.16.0 config/deploy.rb.sample
nesta-0.15.0 config/deploy.rb.sample
nesta-0.14.0 config/deploy.rb.sample
nesta-0.13.0 config/deploy.rb.sample