Skip to content

KISSmauticDKR 5.1.1 Your next favorite Mautic Docker Container.

If you like to deploy your tools with Docker, you probably already use or have used the fantastic official docker images for Mautic.
The official images are great for complex deployments and allow separation of concerns, to a certain degree… perfect for, let’s say… Kubernetes and similar tools running in a cluster of servers…

But for the average developer or geeky marketer who just wants to give Mautic a quick spin, the official images are serious overkill, and its complexity requires to first understand how these images operate before deployment, prepare the proper infrastructure, etc…

Tempted? Give it a quick spin:
docker run -d --name KISSmauticDKR -p 8080:80 martechws/kiss-mautic:5.1.1
Takes just a few seconds to launch, then go to http://localhost:8080

That is why I decided to create KISSmauticDKR, a one-container-has-it-all (yes, including the database) aiming at the simplest possible deployment, with just one docker run command, hence the KISS naming.

Pull & Play, very verbose, KISS Dockerfile for Mautic 5.1.1

Easy to test, simple to troubleshoot, and most importantly, it takes care of most of the configuration for you, because all of that, I am certain this will become your second favorite Mautic Docker Image for testing new Mautic versions and play with Mautic.

I have heavily commented the Dockerfile and helper script, so you can easily understand what is going on and do some modification if you feel like it.
This GitHub repo hosts the Dockerfile:
https://github.com/Martech-WorkShop/KISSMauticDKR

The KISS naming might seem contradictory with how everything has been crammed into one single container, and Yes, all these RUN commands make the image heavy, and then sooo many comments…
Yes, all this adds a bit of complexity on the Dockerfile itself, and breaks the one service per container rule, by design.
Please understand, here, the KISS principle means Simple and easy for the user to deploy.
The comments are there for clarity and to facilitate modifications and playfulness.
In favor of that kind of KISS, elegance and other types of simplicity had to be sacrificed, I hope you will excuse my boldness.

This Dockerfile concentrates on simplicity and convenience for the person deploying the image, as well as clarity and verboseness for those wanting to understand what is going in the Dockerfile or wanting to do modifications to it.

It installs all the components required to run Mautic in one single Docker container.
It deploys Apache2, PHP-FPM, MariaDB and Mautic, as well as many required packages and some configuration files for those services.

The database is prepopulated with a user and a Mautic database as well as the Mautic DB schema, so you don’t have to go through Mautic’s installation (wizard) process.

How to use it?

You have 2 main options:

a) Deploy from DockerHub (recommended).

The easiest way to use this image is to deploy it directly from the Docker Hub, use this command:
docker run -d --name KISSmauticDKR -p 8080:80 martechws/kiss-mautic:5.1.1
or

b) Clone from repo and build locally.

git clone Martech-WorkShop/KISSMauticDKR

docker build -f 511.Dockerfile . -t KISSmauticDKR:5.1.1

docker run -d --name KISSmauticDKR -p 8080:80 martechws/kiss-mautic:5.1.1

Use your browser to navigate to http://localhost:8080

To log into the container:
docker exec -ti KISSmauticDKR bash

Here are your default credentials:
MAUTIC_DB_NAME=mautic-db
MAUTIC_DB_USER=mautic-db-user
MAUTIC_DB_PASSWORD=mautic-strong-password
MAUTIC_LOGIN=ChangeMeRightNow!
MAUTIC_LOGIN_PWD=ChangeMeRightNow!


The Mautic Login and its password are NOT yet parametrized, so you can not yet define these 2 variables at runtime.
If you want to change the db name, db username or db password, you can do it when running the container, with the -e modifier ans pass the variable name and value, like this:
docker run -d -e MAUTIC_DB_PASSWORD=my-own-mautic-password --name KISSmauticDKR -p 8080:80 martechws/kiss-mautic:5.1.1

Intended uses:

  • A simple way to test Mautic, pull & play.
  • A live overview of Mautic requirements.
  • A starting point for Mautic code exploration and tinkering.
  • A way to play with Dockerization, Dockerfiles and Docker image creation.

It is NOT meant as a production ready image.

If you have any ideas how to make it clearer or simpler, email me, submit a PR or post an Issue.

Yosu Cadilla

My name is Yosu Cadilla, a Systems Analyst and Platform Engineer for mktg.dev
I discovered Mautic in 2017 and since have specialized in:
– Running Mautic for Marketing Agencies.
– Running large Mautic instances, sometimes
with millions of contacts.
– Helping companies build and optimize their (usually Mautic) runtime infrastructure.

If you are planning on deploying Mautic for your Marketing Agency, or you have a large Mautic Instance…
Let’s have a chat! yosu.cadilla@gmail.com