Commit eefd03b8406be3f813e9d75a9474d677dfc5a27f
1 parent
726b9162
Exists in
master
and in
1 other branch
Also add asset compilation to deploy
Showing
1 changed file
with
11 additions
and
0 deletions
Show diff stats
config/deploy.example.rb
| ... | ... | @@ -38,6 +38,7 @@ set(:current_branch) { `git branch`.match(/\* (\S+)\s/m)[1] || raise("Couldn't d |
| 38 | 38 | set :branch, defer { current_branch } |
| 39 | 39 | |
| 40 | 40 | after 'deploy:update_code', 'errbit:symlink_configs' |
| 41 | +before "deploy:create_symlink", "assets:compile" | |
| 41 | 42 | |
| 42 | 43 | namespace :deploy do |
| 43 | 44 | task :start do ; end |
| ... | ... | @@ -64,6 +65,16 @@ namespace :errbit do |
| 64 | 65 | end |
| 65 | 66 | end |
| 66 | 67 | |
| 68 | +namespace :assets do | |
| 69 | + desc <<-DESC | |
| 70 | + Compile assets. | |
| 71 | + DESC | |
| 72 | + task :compile, :roles => :app do | |
| 73 | + run "cd #{latest_release} && bundle exec rake RAILS_ENV=production RAILS_GROUPS=assets assets:precompile" | |
| 74 | + end | |
| 75 | + | |
| 76 | +end | |
| 77 | + | |
| 67 | 78 | namespace :db do |
| 68 | 79 | desc "Create the indexes defined on your mongoid models" |
| 69 | 80 | task :create_mongoid_indexes do | ... | ... |