Capistrano 3 copy strategy equivalent

后端 未结 3 625
醉酒成梦 2021-02-20 16:25

I updated to Cap 3 and it appears that set :deploy_via, :copy is no longer supported. In the release annoucement there is a link to a video for replicating the copy

  • 2021-02-20 16:42

    I ran into the same issue and posted a similar question on the capistrano google group.

    See here:!topic/capistrano/BRa4Vj1_mEo

    Short answer: Write your own rake task.

    The capistrano maintainer provided some example code, via a blog post on his website, that can be found here:

    In the end, we've decided to go w/ a different strategy entirely, and implement a mirror repository on the same network as our servers.

    0 讨论(0)
  • 2021-02-20 16:47

    There is one work in the exact same way

    Capistrano 3 :copy

    A copy strategy for Capistrano 3, which mimics the :copy scm of Capistrano 2. This Gem is inspired by and based on Thank wercker so much.

    This will make Capistrano tar the a specific git branch, upload it to the server(s) and then extract it in the release directory.


    cap uat deploy -s branch=(your release branch)

    0 讨论(0)
  • 2021-02-20 16:53

    You can use its gem -


    set :scm, :copy

    set :include_dir, '/User/w1ldzer0/ExampleDir'

    and go

    0 讨论(0)