Help on Dockerized install of 5.0

Hello, i’m using Mautic 4.x on a bare-metal host and want to move to Mautic 5.x and Docker as runtime environment.

I found this repo on Github:

But need some help to get this to run. I’ve installed
Docker version 26.1.2, build 211e74b
on a Debian Linux (Bullseye) 11.9

I’ve git cloned the repo above and copied the files under examples/basic/* into the project root to start with (i think i will prefer fpm-nginx, but i would try to start small)

me@dockerhost:~/docker-mautic$ docker-compose build
ERROR: The Compose file './docker-compose.yml' is invalid because:
networks.default value Additional properties are not allowed ('name' was unexpected)
services.db.healthcheck value Additional properties are not allowed ('start_period' was unexpected)
services.mautic_web.healthcheck value Additional properties are not allowed ('start_period' was unexpected)
Invalid top-level property "x-mautic-volumes". Valid top-level sections for this Compose file are: version, services, networks, volumes, and extensions starting with "x-".

You might be seeing this error because you're using the wrong Compose file version. Either specify a supported version (e.g "2.2" or "3.3") and place your service definitions under the `services` key, or omit the `version` key and place your service definitions at the root of the file to use version 1.
For more on the Compose file format versions, see
services.mautic_web.depends_on contains an invalid type, it should be an array
services.mautic_cron.depends_on contains an invalid type, it should be an array
services.mautic_worker.depends_on contains an invalid type, it should be an array

Then i removed the “version” line from docker-compose.yml, but ran into this:

ERROR: In file './docker-compose.yml', service 'x-mautic-volumes' must be a mapping not an array.

I would also like to have this inside my own Gitlab server to automate things using the Gitlab CI/CD pipelines. But this task should be done in the seconds step.

Can anybody more experienced than me can lend me a hand on to start Mautic 5 as Docker containers?

On problem was that i used old docker-compose which is an separate tool and somewhat deprecated now. I used “docker compose” (note the missing dash) which is part of docker itself and now it builds with the small modification from above (remove the first line in yml).

Next was to get access to the web interface. Therefore i’ve added the hostname of the accessible site to the docker-compose.yml:


This way the container running Apache2 for the Mautic Web-Interface get’s the hostname set and so Apache2 can lookup a hostname and use this internally for the ServerName directive. This will prevent the warning:

AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using Set the 'ServerName' directive globally to suppress this message

But more than this cosmetic feature it put’s in a valid redirection URL instead of “localhost” which does not work when calling it in the network from your PC:

<meta http-equiv="refresh" content="0;url='http://localhost/index.php/installer'" />

I then startup “manually” by:

docker compose up -d db

watch the outcome logs and if all looks ok, continue with the web-interface

docker compose up -d mautic_web

and get into this:

Ok, now i’m going to think about how to migrate my data from my bare-metal Mautic 4.4 into this container…