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

前端 未结 12 1386
野性不改
野性不改 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:05

    In my Subversion repos for PHP, configuration files that contain passwords are checked in as config.php.sample with hints to what has to be provided and scripts relying require a config.php to be present at the same location.

    The repository is configured to ignore config.php for that directory to avoid "accidental" adds or check-ins.

提交回复
热议问题