Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Config directory is a bad place for sqlite databases #28

Open
werrolf opened this issue Jun 6, 2017 · 0 comments
Open

Config directory is a bad place for sqlite databases #28

werrolf opened this issue Jun 6, 2017 · 0 comments
Assignees

Comments

@werrolf
Copy link
Contributor

werrolf commented Jun 6, 2017

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

@eSlider eSlider self-assigned this Sep 7, 2017
@eSlider eSlider added this to the 1.2.0 milestone Sep 7, 2017
@AxxL AxxL removed this from the 1.2.0 milestone Jul 30, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants