Should server/database config files, including passwords, be stored in source control?

前端 未结 12 1348
野性不改
野性不改 2020-11-29 00:39

I\'m looking to hear some best practices...

Assuming a web application that interacts with a few different production servers (databases, etc.)... should the configu

12条回答
  •  感情败类
    2020-11-29 01:06

    Leaving aside the point that passwords should never be stored in plain text anywhere (other than someone's cranium or a locked vault accessible only to the CEO, CFO and CIO (and needing all three keys at once)), you should store everything into source control that's required to build your product.

    That means not just your source, but even the specifications for the build machines, compiler options, the compilers themselves and so on.

    If we could find a way to check in the physical hardware, we'd do that too :-)

    Everything that can be reproduced by the build process itself, or anything for running rather than building the software (such as your passwords) does not generally belong under source control but some shops will do that for their executables, generated docs and so on, just so that they can quickly get a specific release out for installation.

提交回复
热议问题