luminus-framework / luminus-template

a template project for the Luminus framework
http://www.luminusweb.net/
MIT License
645 stars 147 forks source link

Mandatory dev and test config excluded in .gitignore #555

Closed mkreis closed 2 years ago

mkreis commented 2 years ago

Precondition:

  1. Set up a new Luminus project, dev and test configurations (dev-config.edn and test-config.edn) are automatically created.
  2. Confirm everything works fine by running lein start
  3. Set up a new git repository, e.g. on Github
  4. Add and commit all files from the new Luminus project to the new Github project.
  5. Now clone this repo into a second, different location.
  6. In this location, run lein start again

Observed:

Expected:

mkreis commented 2 years ago

I can understand the reasoning why to exclude those files from versioning, but in my opinion it is more important not to exclude any file which must be present in order to run the project.

yogthos commented 2 years ago

The reason the files are excluded is due to the fact that they're likely to contain secretes such as database connections. Checking these files by default could lead to these secrets being leaked, and so the default configuration errs on the side of caution.

mkreis commented 2 years ago

Hi Dmitri, thank you for the clarification. That was also my assumption why they are excluded.

The reason I opened this issue nonetheless is that I ran into this problem and spent quite some time figuring out what was wrong, and it seems I'm not the only one: https://llsouder.blogspot.com/2018/10/more-yak-shaving-in-clojure.html

So perhaps it is possible to improve the experience by allowing configuration files to be missing? What do you think?

yogthos commented 2 years ago

If the configuration is missing then the app would likely not be able to function. Also, worth noting that configuration will not necessarily come from files. For example, it could be provided via environment variables, so it can be a valid use case not to check in the files. I think it might be better to add a note somewhere in documentation regarding this.