-1

I want to deploy my Symfony2 application to two servers with one IP but different SSH-Ports in one "cap deploy" command:

Connect via SSH to 127.0.0.1:22 and deploy, then connect via SSH to 127.0.0.1:24 and deploy

How do I accomplish this with Capifony/Capistrano?

I can only find examples where I can deploy to different IPs but not to two different ports to one IP at the same time.

akluth
  • 8,393
  • 5
  • 38
  • 42
  • Did you try: http://stackoverflow.com/questions/2241337/rails-slicehost-capistrano-deployment-port-issues – CDub Jan 14 '13 at 15:07
  • Hi, thank you for your response, but that's not what I want. Capifony should connect via SSH two times to the same server, the first time to the server 127.0.0.1 at port 22, the second time at port 24 and do a complete deployment each time. – akluth Jan 14 '13 at 15:22

1 Answers1

2

Like @CDub already said:

Use 2 separate tasks and 1 common and just override `:port' value in each of them. Something like that:

  task :first do
    set :port,   22
    ...
  end

  task :second do
    set :port,   24
    ...
  end