Deploy subdirectory with mina

六月ゝ 毕业季﹏ 提交于 2019-12-05 22:10:15

Please check out this repo, https://github.com/thopham/mina-rsync, stage-sub-folder branch. Please see also my gist, https://gist.github.com/xlogan/10519195

I was able to fix this by wrapping a number of the setps in a in_directory './rails' do end block like this (my rails app is under the rails directory):

task :deploy => :environment do
  deploy do
    # stop accepting new workers
    invoke :'sidekiq:quiet'

    # Put things that will set up an empty directory into a fully set-up
    # instance of your project.
    invoke :'git:clone'
    in_directory './rails' do
      invoke :'deploy:link_shared_paths'
      invoke :'bundle:install'
      invoke :'rails:db_migrate'
      invoke :'deploy:cleanup'
    end    

    to :launch do
      in_directory './rails' do
        #invoke :'sidekiq:restart'
        invoke :'unicorn:restart'
      end
    end
  end
end
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!