Presently the Wikibase Registry(setup publish) is deployed using the shoehorning strategy described in certainly one of my earlier posts. After continued discussion on the Wikibase Consumer Group Telegram chat about totally different setups and improve woes I’ve decided to convert the Wikibase Registry to make use of the prefered strategy of a customized Dockerfile building a layer on prime of one among the wikibase pictures.

I lately updated up to date the Wikibase registry from Mediawiki version 1.30 to 1.31 and described the course of in a current submit, so if you wish to see what the current setup and docker-compose file seems like, head there.

As a abstract the Wikibase Registry makes use of:

  • The wikibase/wikibase:1.31-bundle image from docker hub
  • Mediawiki extensions:

Creating the Dockerfile

Our Dockerfile will probably find yourself wanting vaugly just like the wikibase base and bundle docker information, with a fetching stage, attainable composer stage and remaining wikibase stage, however we gained’t need to do something that is already achieved in the base image.

Fetching stage

Modifying the logic that’s utilized in the wikibase Dockerfile the additional Wikibase Registry extensions could be fetched and extracted.

Notice that I’m utilizing the convenience script for fetching Mediawiki extensions from the wikibase-docker git repo matching the model of Mediawiki I will probably be deploying.

Composer stage

None of those extensions require a composer set up, so there might be no composer step in this instance. If Nuke for instance required a composer set up, the stage would seem like this.

Wikibase stage

The Wikibase stage wants to tug in the two fetched extensions and make another modifications to the resulting image.

In my earlier submit I overwrote the entrypoint to something a lot easier eradicating logic to do with ElasticSearch that the Registry is just not at present using. In my Dockerfile I’ve simplified this even further inlining the creation of a easy 5 line entrypoint, overwriting what was offered by the wikibase picture.

I’ve left the default LocalSettings.php in the image for now, and I will continue to override this with a docker-compose.yml volume mount over the file. This avoid the have to rebuild the picture when all you need to do is tweak a setting.

If the composer stage was used to run a composer command on one thing that was fetched then you definitely would probably have to COPY that extension –from the composer layer quite than the fetcher layer.

Constructing the image

I’m going to construct the image on the similar server that the Wikibase Registry is operating on, as that is the simplest choice. Extra difficult choices might involve constructing in some Continuous Integration pipeline and publishing to an image registry reminiscent of Docker Hub.

I selected the descriptive identify “Dockerfile.wikibase.1.31-bundle” and saved the file alongside my docker-compose.yml file.

There are a number of approaches that would now be used to build and deploy the picture.

  1. I might add a build configuration to my docker-compose file specifying the location of the Dockerfile as described right here then constructing the service picture utilizing docker-compose as described right here.
  2. I might build the image separate to docker-compose, giving it an applicable identify after which simply use that picture identify (which can exist on the host) in the docker-compose.yml file

I’m going with choice 2.

docker build documentation could be discovered here. The command tells docker to build a picture from the “Dockerfile.wikibase.1.31-bundle” file, pulling new versions of any pictures getting used and giving the image the identify “wikibase-registry” with tag “1.31-bundle-1”

The image should now be visible in the docker photographs listing for the machine.

Deploying the new picture

In my earlier submit I migrated from one image to a different having two Wikibase containers operating at the similar time with totally different photographs.

For this picture change nevertheless I’ll be going for more of a “big bang” strategy and I’m pretty confident.

The current wikibase service definition could be seen under. This consists of volumes for the entry point, extensions, LocalSettings and pictures, some of which I can now eliminate. Also I’ve eliminated the requirement for most of those setting variables through the use of my own entrypoint file and overriding LocalSettings solely.

The brand new service definition has an updated image identify, eliminated redundant volumes and decreased setting variables (DB_SERVER continues to be used as it’s wanted in the entrypoint I added).

For the huge bang switchover I can simply reload the service.

Utilizing the docker-compose photographs command I can affirm that it’s now operating from my new picture.

Last ideas

  • This should in all probability be documented in the wikibase-docker git repo which everybody seems to seek out, and in addition in the README for the wikibase image.
  • It might be nice if there were a single place to tug the script from, maybe with a parameter for model?

Related posts
accessibilityBlogbrowserChromeedgeFirefoxInternet ExplorersafariusabilityUXWeb

Group Labels Do Not Guarantee… Uniquity?

AdoreboardanalyticsBlogcustomer centricitycustomer experienceCXdata scienceemotion analysismarginal gains

Are Marginal Gains the Answer to Measuring Customer Experience? – Adoreboard Blog


Old Forge’s new passion: mountain biking


David Gibson On APA Appointments; Role of Statewide Interests –