Nodeta OyEtusivu

Esimerkki Capistranon deploy.rb -tiedostosta

set :application, "SOVELLUKSEN_NIMI"

# SCM
set :repository,  "https://svn.osoite.tld/sovellus/trunk"
set :scm_username, "SVN_KÄYTTÄJÄTUNNUS"
set :scm_password, "SVN_SALASANA"

# SSH
set :user, "SSH_KÄYTTÄJÄTUNNUS"
set :password, "SSH_SALASANA"

# DEPLOYMENT
set :keep_releases, 2
set :group_writable, false
set :deploy_to, "/rdata/www/SSH_KÄYTTÄJÄTUNNUS/#{application}"

# SERVERS
role :app, "web.nodeta.fi"


namespace :deploy do

  task :restart do
    run "killall dispatch.fcgi || true"
  end

  task :after_update_code do
#    run "cp #{release_path}/config/database.yml.deploy #{release_path}/config/database.yml"
    run "cd #{release_path} ; export RAILS_ENV=production; rake db:migrate"
  end

end


Nodeta Oy • Osoite: Kutomotie 9 C, 00380 Helsinki • Y-tunnus: 1880029-2 • nodeta@nodeta.fiLisää yhteystietoja »