I have a rails application which needs to connect to two different databases. These database definitions are both in the database.yml file in my repository, with the format:
production:
adapter: ...
database: ...
username: ...
password: ...
secondary-production:
adapter: ...
database: ...
username: ...
password: ...
I have that format for production, staging, and development databases. When running cap deploy or cap production deploy, I need to make both database definitions come through.
I wasn’t the person who set up capistrano on this app, and I’ve never used it before, so I’m finding it hard to work out how to do this. Could anyone point me to a relevant piece of documentation or let me know what file and syntax I need to use for it?
I found the answer.
There was a database.yml.erb file in the /config/recipes/templates folder that I had to update.