bhima icon indicating copy to clipboard operation
bhima copied to clipboard

Supporting site-specific data within BHIMA

Open jmcameron opened this issue 2 years ago • 3 comments

In order to simplify adding site-specific data to the main BHIMA repo, I suggest doing some updates so that site-specific data can be added via submodules. Here is what I propose:

  • Create a new (empty) directory within BHIMA named 'site'
  • Add site and .gitmodules to the .gitignore file so that they can be updated without modifying the main BHIMA source code.

NOTES

  • Neither site nor .gitmodules are currently under version control of BHIMA
  • To use this, we would create a repo for the site-specific data (which could be private). The use git "submodule" commands to create a submodule for the site-specific repo under the site directory. Given the proposed change for site directory and .gitmodules file, adding the new submodule would require no changes to the BHIMA repo itself.
  • One potential future problem with this approach is if we decide at some later date to use a submodule as an official part of BHIMA, we will have to make .gitmodule an official part of BHIMA and remove it from the .gitignore file. Then developers will have problems keeping their copy of .gitmodule up to date (if they add a site-specific module). It is not clear to me that we would ever need to do that, since all our current external dependencies are handled as node modules. See a discussion of this issue for more about this problem.

jmcameron avatar Jul 12 '22 09:07 jmcameron

@jmcameron what do we have inside the 'site' folder ? only deployment scripts such SQL or entire module which can contains js, css, html ?

mbayopanda avatar Jul 12 '22 10:07 mbayopanda

I was thinking about site-specific SQL setup files, images files (eg, for Logos), etc. I was not thinking about any javascript, css, or html file. Hopefully BHIMA itself would handle all that.

jmcameron avatar Jul 12 '22 11:07 jmcameron

I suppose this could also be done more simply by adding a site directory to the main BHIMA .gitignore file and rely on anyone wanting to add private data there to clone it themselves in the site directory and update it themselves. This might more future-proof than using the submodule approach. The git submodule makes including an foreign repo within project repo simpler in some ways, but managing git yourself manually inside a directory ignored by the main BHIMA repo just requires a little more work.

jmcameron avatar Jul 12 '22 12:07 jmcameron