Question

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.

Was it helpful?

Solution

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

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top