-
Notifications
You must be signed in to change notification settings - Fork 8
Description
Currently digitizer-styles.sqlite et al live in the app/config tree.
This is not usually a server-writable location. In Docker deployments, we can mount the whole tree as read only except for spefic writable directories, and would benefit from consolidating on a more logical placement of the sqlites, because it is hard / impossible to exempt single files (opposed to dirs) from the read-only policy.
Every project forked from mapbender-starter already has an app/db directory that seems perfect for this. It is logically a place purely for runtime modifiable files, with contents on gitignore.
The code change is quite trivial. The real issue is finding the right strategy to "migrate" the existing sqlite databases on an existing installation from old location to new location, so all data can be maintained.
Otherwise, here's a single sed statement (also munges mapbender/search, which has the same peculiarity of storing sqlite databases in the config dir).
$ sed -i.bak -e 's#"/config/"#"/db/"#g' vendor/mapbender/digitizer/Mapbender/DigitizerBundle/Component/DigitizerStyleManager.php vendor/mapbender/search/Component/BaseManager.php