despens created this task. despens added a project: Wikibase-Containers. Restricted Application added a subscriber: Aklapper. Restricted Application added projects: Wikidata, User-Addshore.
TASK DESCRIPTION Currently, the Wikibase docker distribution uses `envsubst` to render settings declared in environment variables from a template file into a single `LocalSettings.php`. If users do not like this, they have to provide their own `LocalSettings.php` and map it into the container. There are several issues with this approach: - The `envsubst` approach is rather exotic <https://github.com/wmde/wikibase-docker/blob/262ffef7cc550381309c360e3e92507e85cd8bf6/wikibase/1.34/base/entrypoint.sh#L36> and requires the essential `$` character in PHP to be escaped as `${DOLLAR}`. - Users that map their own `LocalSettings.php` need to make sure that it still contains all the settings made in the default file. This is especially crucial during version updates. Unfortunately, the source code for the default `LocalSettings.php` file is distributed across two docker containers (1 <https://github.com/wmde/wikibase-docker/blob/master/wikibase/1.34/base/LocalSettings.php.template>, 2 <https://github.com/wmde/wikibase-docker/blob/master/wikibase/1.34/bundle/LocalSettings.php.wikibase-bundle.template>), wikibase `base` and `bundle`, and as described above pretty hard to parse and error-prone to adopt. Instead, the default `LocalSettings.php` should be changed to read configuration settings via the standard PHP function `getenv()` and then load optional user-specific configuration from a directory. This would allow users to leave the default `LocalSettings.php` just as provided by the docker distribution. Instead of mapping a custom `LocalSettings.php` into the container, they would map a directory containing _additional_ configuration, for instance loading more extensions or skins. Here is an example of how the official `LocalSettings.php` could look, as in use by Rhizome: https://gist.github.com/despens/1fb618747488298f6f83ea9468661fd3 Additional configuration is loaded from a directory called `LocalSettings.php.d`—of course that could be named differently. That directory is mapped into the container and holds the files 000_main.php, 100_namespaces.php,200_extensions-wikibase.php, 201_extensions-localmedia.php, 202_extensions-scribuntu.php, 203_extensions-geshi.php, 204_extensions-sendgrid.php, 205_extensions-visualeditor.php, 301_theming-rhizome.php, 400_permissions.php, 500_debugging.php — you get the idea. This approach allows for the following mindblowing workflows: - Users can upgrade Wikibase without having to weed through the default `LocalSettings.php` that is required for just basic operation, and compare it against their customized version. - Should they need to examine the default file, it will be easily readable and they could copy lines verbatim from the git repository. - On upgrades, users will benefit of new features being enabled and not accidentally miss the good stuff or end up with a misconfiguration. - Different team members can focus on configuring specific parts of their Wikibase and not worry about the rest of the configuration. - Version control will be improved. TASK DETAIL https://phabricator.wikimedia.org/T264007 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Addshore, despens Cc: despens, Aklapper, Samantha_Alipio_WMDE, Akuckartz, darthmon_wmde, Jelabra, Nandana, Lahi, Gq86, GoranSMilovanovic, QZanden, LawExplorer, _jensen, rosalieper, Scott_WUaS, Asahiko, Wikidata-bugs, aude, Addshore, Mbch331
_______________________________________________ Wikidata-bugs mailing list Wikidata-bugs@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs