0

I'm working with project on local machine where internet connection is so slowly. For best testing i have another server in other place with fast internet connection. To test my projects i'm use capistrano with puma. But my client use production environment on his server on capistrano with unicorn.

Question:

How can i divide my puma_deploy.rb and (unicorn_)deploy.rb for work with both capistrano deployments? P.S. when i push repo to client, i add puma_deploy.rb to .gitignore, to prevent confuse with clients administrators, which makes deploy from own repo to own server.

Sergio Belevskij
  • 2,478
  • 25
  • 24
  • while i don't know answer for this question, i'm write bash script for cap deploy. This script after commit and push to repositories doing a swap of deploy.rb and puma_deploy.rb, make deploy and swap them back after. – Sergio Belevskij Sep 24 '14 at 16:45

1 Answers1

0

It sounds like you could use the Capistrano Multistage extensions to manage your deployments in different environments.

You could set up your environment (the one you use for testing) as a "staging" environment.

However, I think it might be a better idea to just use the same thing for both your testing/staging environment as production. If there is a problem with the webserver or its configuration, you might not know until it goes to production, then it is sad faces all around trying to track down the issue.

Unixmonkey
  • 18,485
  • 7
  • 55
  • 78