author | Jan Vrany <jan.vrany@fit.cvut.cz> |
Thu, 19 Nov 2015 09:40:33 +0000 | |
changeset 310 | c01892c16c71 |
parent 284 | 6389d05c5faf |
permissions | -rw-r--r-- |
33 | 1 |
require 'bundler/capistrano' |
284
6389d05c5faf
Be more specific about ruby version
Marcel Hlopko <marcel@hlopko.com>
parents:
280
diff
changeset
|
2 |
set :rvm_ruby_string, '2.0.0-p195' |
33 | 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' |
280
0e38885a2a13
Use `Smalltalk at: #Class` to access St/X classes in jv_calipel_s
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
248
diff
changeset
|
16 |
set :user, "hlopkmar" |
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 |
||
280
0e38885a2a13
Use `Smalltalk at: #Class` to access St/X classes in jv_calipel_s
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
248
diff
changeset
|
22 |
#set :default_environment, { |
0e38885a2a13
Use `Smalltalk at: #Class` to access St/X classes in jv_calipel_s
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
248
diff
changeset
|
23 |
# 'PATH' => "/home/hlopkmar/.rvm/gems/ruby-2.0.0-p195/bin:/home/hlopkmar/.rvm/bin:$PATH" |
0e38885a2a13
Use `Smalltalk at: #Class` to access St/X classes in jv_calipel_s
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
248
diff
changeset
|
24 |
#} |
33 | 25 |
|
244 | 26 |
set :shared_children, shared_children + [ |
27 |
"public/uploads", |
|
28 |
".htaccess", |
|
248
8253ffff0694
Hmm bad sqlite is being linked, why?
Marcel Hlopko <marcel@hlopko.com>
parents:
247
diff
changeset
|
29 |
"/db/production.sqlite3", |
244 | 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 |