capifony deployment task order : site unavailable during grunt

36 views Asked by At

I am using capifony to deploy my symfony 2 application.

I run two late tasks. During the time grunt is run, my website is unavailable. I've tried to play around with tasks order without success.

How should I configure the following task or what else should I do to make sure my website does not become unavailable durint the grunt process (ideally, the simlink to current would be changed after the grunt command has finished) ?

after 'deploy:restart', 'deploy:dump_dev_assets'
after 'deploy:dump_dev_assets', 'deploy:grant_permissions'

namespace :deploy do
 desc "Dump dev assets"
  task :dump_dev_assets do
   run("cd #{deploy_to}/current && npm install")
   run("cd #{deploy_to}/current && bower install --allow-root")
   run("cd #{deploy_to}/current && grunt")
  end
end

namespace :deploy do
    desc "Grantpermissions"
    task :grant_permissions do
        run "sudo chmod -R 777 #{latest_release}/app/cache"
        run "sudo chmod -R 777 #{latest_release}/app/logs"
        run "sudo chmod -R 777 #{latest_release}/web/uploads"
        run "sudo chmod -R 777 #{latest_release}/web/media"
    end
end
0

There are 0 answers