ejnnr / web-chess

A web implementation of a chess database program like Scid.
MIT License
7 stars 4 forks source link

Restructure configuration files #11

Closed ejnnr closed 9 years ago

ejnnr commented 9 years ago

If you change any settings in configuration files on your local machine, like database passwords, you hav to be very careful not to push them to github. That should be changed. I would suggest the following:

  1. Rename the current include/config.php to config/config.sample.php (the new config directory isn't a necessity but it's a somewhat better structure)
  2. Make config/config.php a symbolic link to config/config.sample.php
  3. Change all includes of include/config.php to config/config.php (obviously)
  4. Put config/config.php in .gitignore

If you want to change any settings on your local machine, you can now just copy config/config.sample.php to config/config.php and edit this file. Your changes will not be pushed. The symbolic link has the advantage that everything will work right out of the box.

That's the best solution that comes to my mind, but i wanted to ask for your opinion first.