Merge DHI Docker compose with already existing Cosmos Server compose

Hi everyone

Here is my issue :
I am actualy using Cosmos Cloud and would like to use the DHI version of MediaWiki to have a public self-hosted server of MediaWiki. I would like to keep the already existing docker compose from Cosmos Cloud with dedicated Cosmos-server labels but use the DHI version of MediaWiki instead of the template provided.

Currently I already know I will need to use dhi. io/mediawiki instead of docker .io/bitnami/mediawiki, but I have several questions :

1. Is the “< tag >” something mandatory?

2. The DHI version of MediaWiki don’t look like to come with a DB server (or I am blind, or Nginx can do both Webserver and DB things)?

3. Can the DHI version of MediaWiki can be auto-updated? If yes, how?

I hope my description is clear enough. If not please ask me your questions, I will reply within one day at the latest.
Sorry for my bad English :sweat_smile:

Kind regards,
Jamblond :heart:

It is generally recommended to explicitly set the tag, otherwise the latest tag will be used.

With DHI images, you will have at least a dev and prod version of the image in a free variation that meets the CIS compliance requirement and one commercial variation that meets CIS, FIPS, STIG (100%). Usually you have those in an Alpine and Debian 13 based alternative. There is no latest tag, and the tags can and most likely will differ from the official images.

It is high likely not to include multiple services in a single image. What you describe is not really the docker way. Services that interact using network connections belong in their own container.

It sounds like the DHI image is not a drop-in replacement for what you are using at the moment. The same would be true, if you migrate to the official MediaWiki image. Though, migration from the official image to the DHI version would be indeed a drop-in replacement.

Update: on a second thought, I can not imagine that the bitnami images has more than one service. Please share the docker compose file you use to deploy the container, or share the exact docker run command you used to create the container, or share the output of docker inspect of your current MediaWiki container.

1 Like

Thank you for your reply and answers :grinning_face:

I would like to use a prod version with Debian 13 and nonroot user MediaWiki 1.45 (php-fpm).

I see a lot of tags available, which one should I use for prod on Raspberry Pi 5 Debian 13 server?

Here is the link to the DHI version of Mediawiki
And here is what the Mediawiki version of Cosmos-Server “template” looks like:

{
  "minVersion": "0.8.0",
  "services": {
    "MediaWiki": {
      "image": "docker.io/bitnami/mediawiki",
      "container_name": "MediaWiki",
      "hostname": "MediaWiki",
      "volumes": [
        {
          "source": "MediaWiki-mediawiki",
          "target": "/bitnami/mediawiki",
          "type": "volume"
        }
      ],
      "environment": [
        "MEDIAWIKI_DATABASE_PASSWORD=Password1",
        "MEDIAWIKI_DATABASE_HOST=MediaWiki-db",
        "MEDIAWIKI_DATABASE_PORT_NUMBER=3306",
        "MEDIAWIKI_DATABASE_USER=bn_mediawiki",
        "MEDIAWIKI_DATABASE_NAME=bitnami_mediawiki",
        "MEDIAWIKI_USERNAME=user",
        "MEDIAWIKI_PASSWORD=bitnami1",
        "MEDIAWIKI_EMAIL=user@mediawiki.com"
      ],
      "networks": {
        "MediaWiki": {}
      },
      "labels": {
        "cosmos-persistent-env": "MEDIAWIKI_DATABASE_PASSWORD, MEDIAWIKI_DATABASE_HOST, MEDIAWIKI_DATABASE_PORT_NUMBER, MEDIAWIKI_DATABASE_USER, MEDIAWIKI_DATABASE_NAME",
        "cosmos-force-network-secured": "true",
        "cosmos-auto-update": "true",
        "cosmos-icon": "https://azukaar.github.io/cosmos-servapps-official/MediaWiki/icon.png",
        "cosmos-stack": "MediaWiki",
        "cosmos-stack-main": "MediaWiki"
      },
      "routes": [
        {
          "name": "MediaWiki",
          "description": "Expose MediaWiki to the web",
          "useHost": true,
          "target": "http://MediaWiki:8080",
          "mode": "SERVAPP",
          "Timeout": 14400000,
          "ThrottlePerMinute": 12000,
          "BlockCommonBots": true,
          "SmartShield": {
            "Enabled": true
          },
          "host": "mediawiki.cosmos-cloud.io"
        }
      ],
      "network_mode": "cosmos-MediaWiki-default"
    },
    "MediaWiki-db": {
      "image": "docker.io/bitnami/mariadb:11.1",
      "container_name": "MediaWiki-db",
      "hostname": "MediaWiki-db",
      "restart": "unless-stopped",
      "networks": {
        "MediaWiki": {}
      },
      "volumes": [
        {
          "source": "MediaWiki-db",
          "target": "/bitnami/mariadb",
          "type": "volume"
        }
      ],
      "environment": [
        "MARIADB_DATABASE=bitnami_mediawiki",
        "MARIADB_USER=bn_mediawiki",
        "MARIADB_PASSWORD=Pasword2",
        "MARIADB_ROOT_PASSWORD=Password3"
      ],
      "labels": {
        "cosmos-persistent-env": "MARIADB_DATABASE, MARIADB_USER, MARIADB_PASSWORD, MARIADB_ROOT_PASSWORD",
        "cosmos-stack": "MediaWiki",
        "cosmos-stack-main": "MediaWiki"
      },
      "network_mode": "cosmos-MediaWiki-default"
    }
  },
  "networks": {
    "MediaWiki": {},
    "cosmos-MediaWiki-default": {
      "Labels": {
        "cosmos.stack": "MediaWiki"
      }
    }
  },
  "volumes": {
    "MediaWiki-mediawiki": {},
    "MediaWiki-db": {}
  }
}

That’s the one you want if you want to use the free version. If you look at the list of images, you will notice a lock icon on those that require a subscription.

Unfortunately. It doesn’t help me to understand what I need to understand in order to help you. There is a reason why I asked specifically:

If you share the output of docker inspect. I will also need the output of docker ps.