Git Product home page Git Product logo

mautic-server's Introduction

Compact Docker server for Mautic

Based on dirtsimple/php-server, and inspired by mingfang/docker-mautic, this container is an alpine nginx+php 7.1 runner for Mautic 2.15.1+ that stores all configuration and data in a separate location from the application code, allowing the use of a proper data volume or mapped directory. Unlike most mautic distributions, cron jobs are handled sequentially and intelligently, so that jobs cannot interfere with each other -- including slow runs of the same job.

In addition to the environment variables supported by dirtsimple/php-server, it also supports settings for:

  • MAUTIC_PRS -- a space-separate list of Mautic PR ids to apply when the container starts. (This can also be set as a build argument, BUILD_PRS.)
  • MAUTIC_JOBS -- a space separated list of mautic: jobs to be run by cron, in execution order. Defaults to:
    • segments:update
    • import
    • campaigns:rebuild
    • campaigns:trigger
    • messages:send
    • emails:send
    • email:fetch
    • social:monitoring
    • webhooks:process
    • broadcasts:send
    • reports:scheduler
  • MAUTIC_JOB_OPTS -- options to pass when running the above jobs; defaults to --no-interaction
  • MAUTIC_JOB_TIMES -- minutes at which jobs should be run; defaults to */5, i.e., every five minutes
  • MAUTIC_DATA -- a directory under which all the instance's configuration, data, translations, media, logs, and cache will be stored; defaults to the volume /data. (Note: If you change this, you will also need to update the NGINX_WRITABLE variable to include the new value instead of /data; see the Dockerfile for the other values that should be included in NGINX_WRITABLE.)

In addition to the above, you can also configure various Mautic settings (e.g. database/SMTP/queue parameters) using environment variables; see the parameters_local.php file for a current list. If it's not clear what value should be used for a given environment variable, you can configure the setting(s) via Mautic's UI and then inspect the config/local.php file in your $MAUTIC_DATA volume to find the values. Values set via environment variables override those set via the UI.

Patches and Pull Requests

Because Mautic sometimes has issues that you may need PRs or custom patches to address, this image supports applying patches automatically. You can list a series of Github PR numbers as a build argument (e.g. docker build --build-args BUILD_PRS="7046 7399 7409"), or as an environment variable on a specific container (in the MAUTIC_PRS environment variable.)

Of course, not all patches you may need to apply are available on Github, so this image automatically applies any patches found in a subdirectory of the container's /patch-sets/ directory. For example, if you mount a directory as /patch-sets/my-patches, then any *.patch files in that directory will also be applied.

Applied patches are copied to /applied-patches, and are not reapplied unless the container is recreated or the patch files' contents change. (Note that changing a patch may result in the patch not being able to be applied, unless you first un-apply the old patch or recreate the container.)

mautic-server's People

Contributors

pjeby avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

mautic-server's Issues

Update to 2.15.2

Mautic 2.15.2 has been released, it would be nice to publish new version of this docker image

Unable to write in the "/code/themes" directory

Hello @pjeby ,
An attempt to install a custom theme leads to this error:
image

Because /code/themes belongs to root but the code is launched under nginx user.
image

I was able to workaround it by applying chown -R nginx:users /code/themes

On a related note: if I upload a custom theme, the image is not stateless anymore. If I bind-mount /code/themes there is a chance of conflict when update to new Mautic version.
How do you deal with this?

Add MAUTIC_TRUSTED_PROXIES env variable

Hello.
I run mautic behind traefik and encountered this issue.
The solution is to manually add 'trusted_proxies' => array('0.0.0.0/0') to config/local.php.
How hard would it be to add MAUTIC_TRUSTED_PROXIES: 0.0.0.0/0 as environment variable?

clarify motivation for alternative to unofficial docker-mautic

(Also posted to mingfang/docker-mautic#6)

Hi there, firstly thanks a lot for sharing this great work!

I'm new to mautic so please forgive me if this is a newbie question, but I was wondering if you could clarify why you decided to build your own docker-mautic? I appreciate that there are problems with the official mautic/docker-mautic (e.g. it is not properly stateless as described in mautic/docker-mautic#2) so I am wondering why you didn't try to fix the problems there? Or did you try to contribute to the official project but encountered problems getting your contributions accepted?

I am asking because each time the community provides a different approach to the same thing, it causes fragmentation in the community, where development effort gets split between the different but overlapping approaches. This results in multiple groups independently trying to fix the same problems, and this slows down the community as a whole.

I think it would be great if the community could try to converge on a single solution. Then each problem only needs to get fixed once in a single place, and newcomers aren't faced with confusion over which solution to pick.

Does this sound reasonable to you? Thanks again!

Add integration cronjobs

As per the official image, there should be support for integration tasks for Salesforce, SugarCRM, etc.

(Note: this is low-priority since I myself don't expect to use any of these integrations any time soon, if ever.)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.