views:

17

answers:

2

For the website(s) I am a developer for we have a number of different technologies which make up our stack, each with a different set of configurations etc.

This is a Rails stack, so we're running things including:

  • Nginx w/ Passenger
  • Varnish
  • Redis
  • Memcached
  • MySQL
  • MongoDB

As we're continually tweaking our configs and changing them to support our continually changing system, and if we were to 'lose' the configurations (e.g. due to a server crash or otherwise) it would be a huge pain to rebuild from memory.

Given that version control would be extremely useful I can quite easily add these files into a Git repo or similar and store them in the cloud somewhere, but what about application-specific configuration (for example, URL Rewrite config for a website on a shared server)? Should these be in this same repo as well?

A: 

Put website specific stuff in the Git repo of that website, and system-wide stuff in a "systems" git repo.

Luke404
A: 

If you are not currently using Source Control (of any kind) in your development environment, stop whatever you are doing and sort that out right now. That is the most important aspect of your setup.

At a very minimum you should keep EVERYTHING that is a text file and relates to your app (yes all config files, URL rewrites).

Others suggest you can put binary files also, but at the very minimum all source code, all config etc should be in source control.

By the end of the day :)

Toby Allen
I think you may have mis-understood me - all of my projects etc are in Git repos, however there's still the 'other' files such as web server config, varnish config, rewrite directives etc, which don't change often and don't need to be re-deployed with each app release etc...
Matthew Savage
My mistake. In that case I would suggest making it part of your repository in a build directory or something similar. its worth having that stuff under source control.
Toby Allen