Passing parameters to Capistrano

前端 未结 5 656
感情败类
感情败类 2021-01-31 16:44

I\'m looking into the possibility of using Capistrano as a generic deploy solution. By \"generic\", I mean not-rails. I\'m not happy with the quality of the documentation I\'m f

5条回答
  •  不思量自难忘°
    2021-01-31 17:08

    Check out capistrano-ash for a library that helps with non-rails deployment. I use it to deploy a PyroCMS app and it works great.

    Here is a snippet from my Capfile for that project:

    # deploy from git repo
    set :repository, "git@git.mygitserver.com:mygitrepo.git"
    # tells cap to use git
    set :scm, :git
    

    I'm not sure I understand the last two parts of the question. Provide some more detail and I'd be happy to help.

    EDIT after example given:

    set :repository, "#{scm_user}@gitsrv.domain:app"
    

    Then each person with deploy priveledges can add the following to their local ~/.caprc file:

    set :scm_user, 'someuser'
    

提交回复
热议问题