Starting or restarting Unicorn with Capistrano 3.x

前端 未结 5 1020
爱一瞬间的悲伤
爱一瞬间的悲伤 2021-02-01 09:31

I\'m trying to start or restart Unicorn when I do cap production deploy with Capistrano 3.0.1. I have some examples that I got working with Capistrano 2.x using so

5条回答
  •  轻奢々
    轻奢々 (楼主)
    2021-02-01 09:44

    To view all caps:

    cap -T
    

    and it shows:

    ***
    cap unicorn:add_worker             # Add a worker (TTIN)
    cap unicorn:duplicate              # Duplicate Unicorn; alias of unicorn:re...
    cap unicorn:legacy_restart         # Legacy Restart (USR2 + QUIT); use this...
    cap unicorn:reload                 # Reload Unicorn (HUP); use this when pr...
    cap unicorn:remove_worker          # Remove a worker (TTOU)
    cap unicorn:restart                # Restart Unicorn (USR2); use this when ...
    cap unicorn:start                  # Start Unicorn
    cap unicorn:stop                   # Stop Unicorn (QUIT)
    ***
    

    So, to start unicorn in production:

    cap production unicorn:start
    

    and restart:

    cap production unicorn:restart 
    

    PS do not forget to correct use gem capistrano3-unicorn

    https://github.com/tablexi/capistrano3-unicorn

提交回复
热议问题