Page MenuHomePhabricator

Consider moving SQLite database into a volume, don't use cache directory in mediawiki-docker
Open, Needs TriagePublic

Description

Volume syncing is slow; we could move the SQLite database into a volume managed by Docker. This would be kind of annoying for anyone using an IDE that connects directly to the database, though.

Event Timeline

Hmm, yeah. We could offer a convenient shorthand for shelling into the mediawiki container and running the sqlite CLI against the db, for example, but if people are using a rich GUI app to get a view on the db (or IDE features that know about schema? I'm really not familiar with what's available in that space) it's not going to be the same experience...

Hmm, yeah. We could offer a convenient shorthand for shelling into the mediawiki container and running the sqlite CLI against the db, for example, but if people are using a rich GUI app to get a view on the db (or IDE features that know about schema? I'm really not familiar with what's available in that space) it's not going to be the same experience...

Yeah, you can have the IDE access data and schema from the DB, which is nice for completions and testing out queries. However, I think once we have a MySQL image we are happy with using, we could consider setting that as the default, and then it's data directory location doesn't really matter at all (the IDE would connect via port mappings).

Just to add details about mwdd here.
mwdd doesn't allow sqlite as an option out of the box preferring mysql or mariadb.
This solves the issue of needing to mount the thing locally to get access to it via an IDE, as the port can just be exposed.
Also "nice" UIs like adminer or phpmyadmin can be provided.
in mwdd v1 and in the go mwdd port these sorts of uis are alos optional and don't run out of the box unless you ask them to run.

IMO UI integration into SQLITE dbs shouldn't be big usecase that mediawiki-docker- tries to cater to.
There are UIs for SQLITe that could exist entirely in docker land if people would want something?
Infact, adminer supports sqlite https://hub.docker.com/_/adminer

Addshore renamed this task from Consider moving SQLite database into a volume, don't use cache directory to Consider moving SQLite database into a volume, don't use cache directory in mediawiki-docker.May 9 2021, 10:14 AM

+1 for storing the database inside the container (or only supporting mysql/mariadb). The main benefit being also that it makes the whole thing easier to reset to start fresh since the database will naturally go away when doing a supposedly full re-creation of the env with "down" and "up".

In mediawiki-docker-dev stop/start were aliased "suspend" and "resume", and up/down were aliased "create" and "destroy", and worked accordingly.