author | Marcel Hlopko <marcel@hlopko.com> |
Thu, 30 Oct 2014 15:07:17 +0100 | |
changeset 247 | 16eb0c974117 |
parent 246 | 4033e869a3a3 |
child 248 | 8253ffff0694 |
permissions | -rw-r--r-- |
33 | 1 |
require 'bundler/capistrano' |
2 |
set :rvm_ruby_string, '2.0.0' |
|
3 |
require 'rvm/capistrano' |
|
4 |
||
5 |
set :application, "calipel" |
|
6 |
||
244 | 7 |
set :scm, :mercurial |
118
71925d2ae258
Web application deploy script updated to JV can deploy too.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
66
diff
changeset
|
8 |
set :repository, "https://bitbucket.org/janvrany/jv-calipel" |
33 | 9 |
|
10 |
set :deploy_via, :remote_cache |
|
11 |
set :deploy_to, "/home/hlopkmar/calipel" |
|
12 |
set :deploy_subdir, "web" |
|
13 |
||
14 |
server "swing.fit.cvut.cz", :app, :web, :db, primary: true |
|
118
71925d2ae258
Web application deploy script updated to JV can deploy too.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
66
diff
changeset
|
15 |
if ENV['USER'] == 'jv' |
244 | 16 |
set :user, "vranyj1" |
118
71925d2ae258
Web application deploy script updated to JV can deploy too.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
66
diff
changeset
|
17 |
else |
71925d2ae258
Web application deploy script updated to JV can deploy too.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
66
diff
changeset
|
18 |
set :user, "hlopkmar" |
244 | 19 |
end |
33 | 20 |
set :use_sudo, false |
21 |
||
22 |
set :default_environment, { |
|
23 |
'PATH' => "/home/hlopkmar/.rvm/gems/ruby-2.0.0-p195/bin:/home/hlopkmar/.rvm/bin:$PATH" |
|
24 |
} |
|
25 |
||
244 | 26 |
set :shared_children, shared_children + [ |
27 |
"public/uploads", |
|
28 |
".htaccess", |
|
29 |
"db/production.sqlite3", |
|
30 |
".env" |
|
31 |
] |
|
32 |
||
66
7dcf9389baaa
automatically run migrations on deploy
Marcel Hlopko <marcel.hlopko@gmail.com>
parents:
34
diff
changeset
|
33 |
after "deploy:update_code", "deploy:migrate" |
7dcf9389baaa
automatically run migrations on deploy
Marcel Hlopko <marcel.hlopko@gmail.com>
parents:
34
diff
changeset
|
34 |
after "deploy:restart", "deploy:cleanup" |
33 | 35 |
|
36 |
namespace :deploy do |
|
37 |
task :restart, :roles => :app, :except => { :no_release => true } do |
|
38 |
run "touch #{File.join(current_path,'tmp','restart.txt')}" |
|
39 |
end |
|
244 | 40 |
end |