Skip to content

Docker Install

Information

See the Docker Setup section before installing Mauro using Docker.

Git repository

Depending on the operating system of the server you are running on, you may first need to install git to checkout the Mauro application. You can read more about installing git on different operating systems here: Getting Started - Installing Git

The Mauro Docker configuration repository can be found here: https://github.com/MauroDataMapper/mdm-docker. Where you clone it is up to you, but on a *nix system we recommend cloning into /opt/ (for optional software packages).

Different branches provide different configurations. We recommend checking out the main branch which will provide the latest releases of back-end and front-end. Alternatively, you can check out a specific tag to install a specific release. Tagged releases of Mauro Docker take the form YYYY.Q[.P], where YYYY.Q is the year and quarter of the release, and .P is an optional point release. For example, 2023.1.1 is point release 1 in Q1 of 2023.

Information

If you're running on an internal server with SSH access forbidden by a firewall, you can use the following link to access the repository via HTTPS: SSH over HTTPS document.


Overview

The Docker Compose configuration defines two interacting containers:

  • Postgres 12 [postgres] - Postgres Database
  • Mauro Data Mapper [maurodatamapper] - Mauro Data Mapper

The first of these is a standard Postgres container with an external volume for persistent storage. The second builds on the standard Apache Tomcat container, which hosts built versions of the Mauro application. The Postgres container must be running whenever the Mauro application starts. The Mauro container persists logs and Lucene indexes to shared folders which can be found in the Docker repository folder.

Default username / password

The Docker installation is empty on initialisation - it comes with one pre-configured user: with the username admin@maurodatamapper.com and the password password.

Warning

We strongly recommend changing this password on first login, and then setting up personal user accounts for individual users.


Building

Once cloned then running the standard docker compose build command will build the images necessary to run the services.

1
2
# Build the entire system
$ docker compose build

Additional Backend Plugins

Additional plugins can be found at the Mauro Data Mapper Plugins organisation page. A complete list with versions can also be found in the installation documentation. Please note that while we will do our best to keep this page up-to-date, there may be circumstances where it is behind. Therefore, we recommend using our official GitHub Plugins organisation to find the latest releases and all available plugins.

Each of these can be added as runtimeOnly dependencies by adding them to the ADDITIONAL_PLUGINS build argument for the mauro-data-mapper service build.

These dependencies should be provided in a semicolon separated list in the Gradle style, they will be split and each will be added as a runtimeOnly dependency.

Example:

1
2
3
4
5
 mauro-data-mapper:
   build:
     context: mauro-data-mapper
     args:
       ADDITIONAL_PLUGINS: "uk.ac.ox.softeng.maurodatamapper.plugins:mdm-plugin-excel:5.2.0"

This will add the Excel plugin to the dependencies.gradle file:

1
runtimeOnly uk.ac.ox.softeng.maurodatamapper.plugins:mdm-plugin-excel:5.2.0

Dynamic Versions

You can use dynamic versioning to add dependencies, however this comes with a risk that it pulls a version which does not comply with your expected version of mdm-application-build/mdm-core ,which may cause conflicts with other plugins. Therefore, we do not advise this approach.

Example

1
2
3
4
5
 mauro-data-mapper:
   build:
     context: mauro-data-mapper
     args:
       ADDITIONAL_PLUGINS: "uk.ac.ox.softeng.maurodatamapper.plugins:mdm-plugin-excel:5.+"

This will add the latest minor version of the Excel plugin.

Theme

Mauro comes with a default user interface theme - with the standard blue branding, and default text on the home page. This can be overridden in the docker-compose.yml file, with instructions provided in the Branding guide. The default theme is called default and can be set with:

1
 MDM_UI_THEME_NAME: "default"

Running multiple instances

If running multiple Mauro Docker instances then they can all make use of the same initial images, therefore you only need to run the docker compose build command once per server.


Run environment

By adding variables to the <service>.environment section of the docker-compose.yml file, you can pass them into the container as environment variables. These will override any existing configuration variables which are used by default. Any defaults and normally used environment variables can be found in the relevant service's Dockerfile at the ENV command.

postgres service

  • POSTGRES_PASSWORD

    This sets the postgres user password for the service. As per the documentation at Postgres Docker Hub, it must be set for a docker postgres container. We have set a default but you can override if desired. If you do override it, you will also need to change the PGPASSWORD environment variable in the mauro-data-mapper section.

  • DATABASE_USERNAME

    This is the username which will be created inside the Postgres instance to own the database which the MDM service will use. The username is also used by the MDM service to connect to the postgres instance, therefore if you change this you must** also supply it in the environment args for the MDM service.

  • DATABASE_PASSWORD

This is the password set for the DATABASE_USERNAME. It is the password used by the MDM service to connect to this postgres container.

mauro-data-mapper service

There are a large amount of variables which either need to be set or can be overridden depending on what plugins have been installed and what features you want. Therefore, you can find all the information on configuring MDM here.

There are 2 environment variables which are not used directly by MDM and these are both optional to be overridden in the compose file.

  • PGPASSWORD

This is the postgres user's password for the postgres server. This is an environment variable set to allow the MDM service to wait till the postgres service has completely finished starting up. It is only used to confirm the Postgres server is running and databases exist. After this it is not used again.

Note

If you change POSTGRES_PASSWORD you must change this to match. This can only** be overridden in the docker-compose.yml file.

  • CATALINA_OPTS

Java Opts to be passed to Tomcat.

Note

This can only be overridden in the docker-compose.yml file.

Environment Notes

Database

The system is designed to use the Postgres service provided in the docker-compose file, therefore there should be no need to alter any of these settings. Only make alterations if running Postgres as a separate service outside of Docker Compose.

Email

The standard email properties will allow emails to be sent to a specific SMTP server.


Docker Reference

Running

Before running please read the parameters section first.

With docker (with docker compose) installed, run the following:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
# Build all the images
$ docker compose build

# Start all the components up
$ docker compose up -d

# To only start 1 service
# This will also start up any of the services the named service depends on (defined by `links` or `depends_on`)
$ docker compose up [SERVICE]

# To push all the output to the background add `-d`
$ docker compose up -d [SERVICE]

# Stop background running and remove the containers
$ docker compose down

# To update an already running service
$ docker compose build [SERVICE]
$ docker compose up -d --no-deps [SERVICE]

If you run everything in the background use Kitematic to see the individual container logs. You can do this if running in the foreground and it is easier as it splits each of the containers up.

If only starting a service when you stop, the service docker will not stop the dependencies that were started to allow the named service to start.

The default compose file will pull the correct version images from Bintray, or a locally defined docker repository.


For more information about administration of your running Docker instance, please see the Administration guide