lulalala
lulalala

Reputation: 17981

Configure domain name outside the source control

I have a Rails application which I now plan to deploy many instances to different domains. Originally I only intend for it to be on one domain.

I realize that for each domain, I have to replace all the hard-coded values in various places. These include:

Question

Is there a strategy to set this, so:

Upvotes: 0

Views: 249

Answers (1)

Frederick Cheung
Frederick Cheung

Reputation: 84114

One approach you can take is to have a YAML file with per deployment properties. You could even check the development version in and have your deploy scripts overwrite with the correct version.

Typically I'd put that configuration file in shared/config (assuming a capistrano style layout) and then symlink it into the current release during the deploy.

Upvotes: 1

Related Questions