Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can capistrano v3 specify HOSTS in command line like v2 does?

In Capistrano v2, I can run deploy on the server specified in the command-line.

cap staging HOSTS="host1,host2" deploy

How can I do the same thing in the Capistrano v3?

example scenario

I have to scale my app, but I don't want to deploy all of my app servers. So I just want to run deploy on the new one.

like image 997
ruohanc Avatar asked Nov 17 '25 22:11

ruohanc


1 Answers

Not sure if you found this or not but the documentation says you can just list it in the command line like this:

cap --hosts=server1,server2 production deploy

See documentation here: Host Filtering Docs

See code here: Code Filtering Link

Looking at the code, it appears to be able to accepts HOSTS also.

See test confirming this: Test Confirming Both Options

like image 98
Richie Rich Avatar answered Nov 19 '25 12:11

Richie Rich



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!