Public Repository

Last pushed: 6 days ago
Short Description
Docker image of the latest version of Mautic
Full Description

Containerized Mautic

===================

<img src="https://www.mautic.org/media/images/github_readme.png" />

License

Mautic is distributed under the GPL v3 license. Full details of the license can be found in the Mautic GitHub repository.

How to use this image

This Docker image is maintained by Autoize Mautic consultants. The latest Mautic version is published after the binaries are released to the open source community by the Mautic team. Our goal is to maintain a constantly updated Docker image that Mautic users can utilize to deploy marketing automation in a containerized environment.

Latest image: The image tagged autoize/mautic:latest is currently Mautic 2.10.1.

Stable image: The image tagged autoize/mautic:stable is currently Mautic 2.9.2.

If you are using Mautic in production, it may be advisable to stay on the stable image while the Mautic team gathers feedback from the community and issues bug fixes for the latest release. The latest image coincides with the latest release available for Mautic's community edition, with the bleeding-edge features; The stable image is held back to a stable, bug fix release on the immediately previous minor version.

Start here

Most users will want to refer to our step-by-step guide to running Mautic as a Docker container but we have retained the more technical documentation below for experienced Docker and Docker Compose users.

===================

docker run --name some-mautic --link some-mysql:mysql -d autoize/mautic

The following environment variables are also honored for configuring your Mautic instance:

  • -e MAUTIC_DB_HOST=... (defaults to the IP and port of the linked mysql container)
  • -e MAUTIC_DB_USER=... (defaults to "root")
  • -e MAUTIC_DB_PASSWORD=... (defaults to the value of the MYSQL_ROOT_PASSWORD environment variable from the linked mysql container)
  • -e MAUTIC_DB_NAME=... (defaults to "mautic")

If the MAUTIC_DB_NAME specified does not already exist on the given MySQL server, it will be created automatically upon startup of the mautic container, provided that the MAUTIC_DB_USER specified has the necessary permissions to create it.

If you'd like to be able to access the instance from the host without the container's IP, standard port mappings can be used:

docker run --name some-mautic --link some-mysql:mysql -p 8080:80 -d mautic

Then, access it via http://localhost:8080 or http://host-ip:8080 in a browser.

If you'd like to use an external database instead of a linked mysql container, specify the hostname and port with MAUTIC_DB_HOST along with the password in MAUTIC_DB_PASSWORD and the username in MAUTIC_DB_USER (if it is something other than root):

docker run --name some-mautic -e MAUTIC_DB_HOST=10.1.2.3:3306 \
    -e MAUTIC_DB_USER=... -e MAUTIC_DB_PASSWORD=... -d autoize/mautic

... via docker-compose

Example docker-compose.yml for mautic:

version: '2'

services:
   db:
     image: mariadb:latest
     volumes:
       - db_data:/var/lib/mysql
     restart: always
     environment:
       MYSQL_ROOT_PASSWORD: supersecret
       MYSQL_DATABASE: mautic
       MYSQL_USER: mautic
       MYSQL_PASSWORD: secret

   mautic:
     depends_on:
       - db
     image: autoize/mautic:stable
     ports:
       - "80:80"
       - "443:443"
     volumes:
       - mautic:/var/www/html
     restart: always
     environment:
       MAUTIC_DB_HOST: db:3306
       MAUTIC_DB_NAME: mautic
       MAUTIC_DB_USER: mautic
       MAUTIC_DB_PASSWORD: secret

volumes:
    db_data:
    mautic:

Run docker-compose up, wait for it to initialize completely, and visit http://localhost:8080 or http://host-ip:8080.

Supported Docker versions

This image is officially supported on Docker version 17.04.0-ce.

Support for older versions (down to 1.0) is provided on a best-effort basis.

Issues

If you have any problems with or questions about this image, please contact us through a GitHub issue or our website.

You can also reach the Mautic community through its online forums or the Mautic Slack channel.

Contributing

You are invited to contribute new features, fixes, or updates, large or small; we are always thrilled to receive pull requests, and do our best to process them as fast as we can.

Before you start to code, we recommend discussing your plans through a GitHub issue, especially for more ambitious contributions. This gives other contributors a chance to point you in the right direction, give you feedback on your design, and help you find out if someone else is working on the same thing.

Docker Pull Command
Owner
autoize

Comments (9)
ihackalot
7 months ago

Pulled v2.7.0 image but mautic is still at v2.6.1

ihackalot
7 months ago

Everything's working fine with 2.6.1 - Thanks @autoize

autoize
7 months ago

@kiwilightweight We publish the Dockerfile in our Github repository which you can find here: https://github.com/autoize/docker-mautic

@ihackalot We have made an update to the Dockerfile beginning with the Mautic 2.6.0 image that should eliminate this problem which has been happening sporadically for some users.

Excited to see the community using our Docker image, we've noticed a huge uptick in downloads recently!

kiwilightweight
7 months ago

I haven't been able to find the Dockerfile for this build - would be useful to see how things are being set up (or to define volumes, etc.). Any reason it's not published on hub.docker.com?

ihackalot
8 months ago

Sorry, you have to set permissions for the whole app folder.

ihackalot
8 months ago

@autoize I confirm @adfinitas issue. You have to chown -R www-data:www-data /var/www/html/app/cache which is owned by root.

autoize
9 months ago

@adfinitas, we pulled and ran the autoize/mautic:2.5.1 image with no issues. Were you deploying a new container, or upgrading from a prior version?

For additional assistance, please contact us at https://autoize.com/contact/

adfinitas
9 months ago

When we see docker logs for the container, we find this error : exception 'RuntimeException' with message 'Failed to write cache file "/var/www/html/app/cache/prod/classes.php".

adfinitas
9 months ago

HI, the last build seems be crashed. ON installer page, we see : The site is currently offline due to encountering an error. If the problem persists, please contact the system administrator.
Thanks