Split out from T214557 which includes some patches that can be used for reference for the adjustments needed.
The adjustments must switch from the old repo based service container and config system to the new entity source based system.
WIP patch by @WMDE-leszek at https://gerrit.wikimedia.org/r/c/mediawiki/extensions/Wikibase/+/494055