Giter Site home page Giter Site logo

docker-mautic's Introduction

Mautic Docker image and examples

Note

This version refers to Docker images and examples for Mautic 5. If you would like information about older versions, see https://github.com/mautic/docker-mautic/tree/mautic4.

Versions

all Mautic 5 Docker images follow the following naming stategy.

<major.minor.patch>-<variant>

There are some defaults if parts are omitted:

  • <minor.patch> is the latest release patch version in the latest minor version.

some examples:

  • 5-apache: latest stable version of Mautic 5 of the apache variant
  • 5.0-fpm: latest version in the 5.0 minor release in the fpm variant
  • 5.0.3-apache: specific point release of the apache variant

Variants

The Docker images exist in 2 variants:

  • apache: image based on the official php:apache images.
  • fpm: image based on the official php:fpm images.

The latest supported Mautic PHP version is used the moment of generating of the image.

Each variant contains:

  • the needed dependencies to run Mautic (e.g. PHP modules)
  • the Mautic codebase installed via composer (see mautic/recommended-project)
  • the needed files and configuration to run as a specific role

See the examples explanation below how you could use them.

Roles

each image can be started in 3 modes:

  • mautic_web: runs the Mautic webinterface
  • mautic_worker: runs the worker processes to consume the messenger queues
  • mautic_cron: runs the defined cronjobs

This allows you to use different scaling strategies to run the workers or crons, without having to maintain separate images.
The mautic_cron and mautic_worker require the codebase anyhow, as they execute console commands that need to bootstrap the full application.

Examples

The examples folder contains examples of docker-compose setups that use the Docker images.

Warning

The examples require docker compose v2.
Running the examples with the unsupported docker-compose v1 will result in a non-starting web container.

Important

Please take into account the purpose of those examples:
it shows how it could be used, not how it should be used.
Do not use those examples in production without reviewing, understanding and configuring them.

  • basic: standard example using the apache image with doctrine as async queue.
  • fpm-nginx: example using the fpm image in combination with an nginx with doctrine as async queue.
  • rabbitmq-worker: example using the apache image with rabbitmq as async queue.

Building your own images

You can build your own images easily using the docker build command in the root of this directory:

docker build . -f apache/Dockerfile -t mautic/mautic:5-apache
docker build . -f fpm/Dockerfile -t mautic/mautic:5-fpm

Persistent storage

The images by default foresee following volumes to persist data (not taking into account e.g. database or queueing data, as that's not part of these images).

  • config: the local config folder containing local.php, parameters_local.php, ...
  • var/logs: the folder with logs
  • docroot/media: the folder with uploaded and generated media files

Configuration and customizing

Configuration

The following environment variables can be used to configure how your setup should behave. There are 2 files where those settings can be set:

  • the .env file: Should be used for all general variables for Mysql, PHP, ...
  • the .mautic_env file: Should be used for all Mautic specific variables.

Those variables can also be set via the environment key on services defined in the docker-compose.yml file.

MySQL settings

  • MYSQL_HOST: the MySQL host to connect to
  • MYSQL_PORT: the MySQL port to use
  • MYSQL_DATABASE: the database name to be used by Mautic
  • MYSQL_USER: the MySQL user that has access to the database
  • MYSQL_PASSWORD: the password for the MySQL user
  • MYSQL_ROOT_PASSWORD: the password for the MySQL root user that is able to configure the above users and database

PHP settings

  • PHP_INI_VALUE_DATE_TIMEZONE: defaults to UTC
  • PHP_INI_VALUE_MEMORY_LIMIT: defaults to 512M
  • PHP_INI_VALUE_UPLOAD_MAX_FILESIZE: defaults to 512M
  • PHP_INI_VALUE_POST_MAX_FILESIZE: defaults to 512M
  • PHP_INI_VALUE_MAX_EXECUTION_TIME: defaults to 300

Mautic behaviour settings

  • DOCKER_MAUTIC_ROLE: which role does the container has to perform.
    Defaults to mautic_web, other supported values are mautic_worker and mautic_cron.
  • DOCKER_MAUTIC_LOAD_TEST_DATA: should the test data be loaded on start or not.
    Defaults to false, other supported value is true.
    This variable is only usable when using the web role.
  • DOCKER_MAUTIC_RUN_MIGRATIONS: should the Doctrine migrations be executed on start.
    Defaults to false, other supported value is true.
    This variable is only usable when using the web role.
  • DOCKER_MAUTIC_WORKERS_CONSUME_EMAIL: Number of workers to start consuming mails.
    Defaults to 2
  • DOCKER_MAUTIC_WORKERS_CONSUME_HIT: Number of workers to start consuming hits.
    Defaults to 2
  • DOCKER_MAUTIC_WORKERS_CONSUME_FAILED: Number of workers to start consuming failed e-mails.
    Defaults to 2

Mautic settings

Technically, every setting of Mautic you can set via the UI or via the local.php file can be set as environment variable.

e.g. the messenger_dsn_hit can be set via the MAUTIC_MESSENGER_DSN_HIT environment variable.
See the general Mautic documentation for more info.

Customization

Currently this image has no easy way to extend Mautic (e.g. adding extra composer dependencies or installing extra plugins or themes).
This is an ongoing effort we hope to support in an upcoming 5.x release.

For now, please build your own images based on the official ones to add the needed dependencies, plugins and themes.

Day to day tasks

Running console commands with Docker Compose

if you want to execute commands, you can make use of docker compose exec.

A full list of options for the command is available on the help pages.
The most important flags used in the examples below are:

  • -u www-data: execute as the www-data user, which is the same user as the webserver runs. This ensures that e.g. file permissions after clearing the cache are correct.
  • -w /var/www/html: set the working directory to the /var/www/html folder, which is the project root of Mautic.

Examples

  • Open a shell in the running mautic_web container:

    docker compose exec -u www-data -w /var/www/html mautic_web /bin/bash
    
  • execute a command in the running mautic_web container and return the output directly

    docker compose exec -u www-data -w /var/www/html mautic_web php ./bin/console
    

Issues

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

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-mautic's People

Contributors

alancpazetto avatar aspiers avatar bohuspollak avatar dennisameling avatar diegoos avatar escopecz avatar fragote avatar gregy avatar luizeof avatar lvnilesh avatar madmath03 avatar mbabker avatar mebinum avatar mollux avatar rafaelaybar avatar rcheesley avatar regevbr avatar safplusplus avatar thinkl33t avatar xavren 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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

docker-mautic's Issues

Disable apache logs (Question)

Is there a easy way to disable apache logs? We can't have them stored for privacy reasons.

Any easy way to disable logs? Preferable without having to build my own Docker image?

Cheers.

Hook up to Redis

I read on the forums that Mautic can be hooked up to Redis - let's make this container be able to hook up easily to a Redis container.

Any thoughts?

Mautic doesn't accept requests to port 443

Unsure if this is by design or not, but when I proxy an https:// request to port 443 on the Mautic container, the container refuses the connection.

However, when I proxy an https:// request to port 80, it accepts it.

Guessing the Apache instance is not setup to open 443?

Container & SSL

Hey,

I can run Mautic with SSL with an nginx-proxy, but I can't seem to figure out how to set up ssl for the container itself.

Without it, forms and such are still generated as http, and while the js is working through https, the generated connection is reported as insecure and throws errors in the browser console.

Problem linking the db

Hi,
I get this error when running the following yml file
mautic_1 | error: missing MAUTIC_DB_HOST and MYSQL_PORT_3306_TCP environment variables mautic_1 | Did you forget to --link some_mysql_container:mysql or set an external db mautic_1 | with -e MAUTIC_DB_HOST=hostname:port? mautic_mautic_1 exited with code 1

version : "3.5"

services:
 mautic:
  image: mautic/mautic
  links:
    - mauticdb:mysql
  ports:
    - 8182:80
  environment:
   - MAUTIC_DB_NAME="mautic"
   - MAUTIC_DB_USER="root"
   - MAUTIC_DB_PASSWORD="mautic"

 mauticdb:
  image: mysql:5.6
  environment:
   - MYSQL_ROOT_PASSWORD="mautic"

Any suggestions?
Thanks

Enable cron to delete cache

Hi,
we need a cron to clear the cache.
The only way to manage cron is to access the container in bash and manually add "www-data php /var/www/html/app/console cache:clear --no-warmup" to mautic cron.d.
It would be useful to have an env variable to enable this cron and another env to input the time interval to run it.


Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

Docker image only partially installs DB schema

TL;DR: When you run the Docker commands to start the official Mautic image as a container, the resulting Mautic looks OK, but it turns out it's still missing 8 schema migrations. To allow them to proceed, you have to DROP TABLE mautic.email_stat_replies; then do php app/console doctrine:migration:migrate

I can't describe the details better than I did in this Slack thread.

Mautic reinstall from the beginning on every docker run

The first time I run the Mautic container, I configure the database on the Web interface and start using Mautic. If I kill the container and run a new one, connected to the same database, I expect it to continue from where it had stopped. Instead it redirects to the install page again. Docker containers are ephemeral by nature, we should be able to kill and run a new one without any additional effort or data loss.

I might be doing something wrong, in which case it would be very nice if someone would point me to the right direction.

Here are the steps to reproduce the behavior:

docker run --name some-mysql -e MYSQL_ROOT_PASSWORD=my-secret-pw mysql
docker run --rm --name some-mautic -p 8005:80 --link some-mysql:mysql mautic/mautic

Configure everything and install Mautic accessing http://localhost:8005 . Then kill the mautic some-mautic container and run it again:

docker run --rm --name some-mautic -p 8005:80 --link some-mysql:mysql mautic/mautic

You will see that you will be back on the "Install Mautic" page.

If you also think that it would be desirable to have the Mautic Docker image being able to persist its state from one container to another, I write this feature and make a PR.

Setup cron jobs

Can we add cron jobs for smart lists and other standard Mautic cron jobs for this image? Alternatively we could make an example of how to link a container managing cron jobs like the Tutum cron image: https://github.com/sillelien/tutum-cron

Let me know what you think and I can make a PR to the documentation.

Hangs when amazon IMAP settings are added to the Default Mailbox

When I add my Amazon SES IMAP settings, specifically the password to the Monitored Inbox Settings Default Mailbox then click the "Test connection and fetch folders" button it will come back saying the information is not correct. I repeated this a few more times to make sure my information was correct and it still said the same thing. The information I was entering is the exact same information I entered in the "Mail Send Settings" area at the top of the page. The tests are successful there.

What I mean by it "Hangs" is that it started to hang after a few times of re-entering my information in the Default Mailbox area and either clicking the test button or the page's apply button. After entering my information over and over again it eventually crashed and it gave me a "Database connection error (code #[0])". I waited a while and that error persisted. To fix it, I tried deleting the cache first and nothing. I then rebooted my server and restarted all of the docker containers. It is now back up and running, but it still hangs for a decent amount of time when I save the configuration page. I don't dare to enter any more information in the Default Mailbox area again. Mail is still sending, but I'm not sure if the Default Mailbox is going to work or not.

Is this a Mautic problem or is this because of Docker somehow?

Documentation on how this should be used with volumes

We use docker for all our site deployments. We decided to not use any of these docker images but swiped some of the php scripts for setting up config files.

Some things I noticed that should be documented:

  • This image is not for stateless use.
    • Setting your environment variables like MAUTIC_DB_HOST is kind of pointless because if you redeploy the container, your local.php will be lost and you have to "re-install" to get your secret_key again. If you put your local.php someplace in a docker volume, then you still don't need the mautic_db_host
    • local.php needs to be stored.
  • media/files should be linked to a docker volume
  • local.php should be linked to a docker volume

How to make this stateless:

  • set db/mandrill into parameters_local.php instead of local.php (mautic/mautic#886)
  • document how to put the local.php someplace where it won't get wiped out
  • probably need more env vars than db.

-link option ignored in docker-compose

Hi! In this docker-compose file, my links option is ignored.

version: '3'
services:
  mautic:
    image: mautic/mautic
    links:
      - db:mysql
    ports: 
      - 8080:80
    depends_on:
      - db

  db:
    image: mysql/mysql-server
    restart: always
    environment:
      MYSQL_ROOT_PASSWORD: root

I get this log message:

mautic_1  | error: missing MAUTIC_DB_HOST and MYSQL_PORT_3306_TCP environment variables
mautic_1  |   Did you forget to --link some_mysql_container:mysql or set an external db
mautic_1  |   with -e MAUTIC_DB_HOST=hostname:port?

Do you get the same behaviour for the compose file?

Edit: I also get this with different mysql versions, including the latest and the version specified by the README

Mautic does not support PHP version 7.0.21

I just ran the container with the docker-compose file included and I received the following error.

Mautic does not support PHP version 7.0.21 at this time. To use Mautic, you will need to downgrade to an earlier version.

Mixed Content https and http

I installed Mautic using "nginx to act as a reverse proxy with ssl support for mautic container" and I'm getting these errors in the console on Chrome:

"Mixed Content: The page at 'https://mydomain.com/test-landing-page' was loaded over HTTPS, but requested an insecure script 'http://mydomain.com/mtc.js'. This request has been blocked; the content must be served over HTTPS."

"Mixed Content: The page at 'https://mydomain.com/test-landing-page' was loaded over a secure connection, but contains a form that targets an insecure endpoint 'http://mydomain.com/form/submit?formId=1'. This endpoint should be made available over a secure connection."

Also, in Mautic settings under Configuration > Tracking Settings > Mautic tracking settings, the script there isn't saying https. (see below)

<script>
    (function(w,d,t,u,n,a,m){w['MauticTrackingObject']=n;
        w[n]=w[n]||function(){(w[n].q=w[n].q||[]).push(arguments)},a=d.createElement(t),
        m=d.getElementsByTagName(t)[0];a.async=1;a.src=u;m.parentNode.insertBefore(a,m)
    })(window,document,'script','http://mydomain.com/mtc.js','mt');

    mt('send', 'pageview');
</script>

I'm pretty sure that has something to do with the landing page having the above Mixed Content errors.

Missing ZipArchive class

I couldn't change language in error logs line:

mautic.ERROR: Fatal: Class 'ZipArchive' not found - in file /var/www/html/app/bundles/CoreBundle/Helper/LanguageHelper.php - at line 77 [] []

In dockerfile sholud be one more PHP ext installed:
docker-php-ext-install zip

SSL and app cache problem

Upfront: I opened an issue at mautic github repository directly (see mautic/mautic#4207 (comment)) before.

The answer there is that the problem is docker mautic related - so see my problem as follows:

What type of report is this:

Q A
Bug report? Probably
Feature request?
Enhancement?

Description:

I set up Mautic via docker-mautic behind a nginx reverse proxy instance using a valid ssl subdomain. Mautic isn't aware of that, generating http-forcing submit link in forms -> page is marked as insecure. As solution requires cleaning the cache - I did so - and mautic is not working any more.

If a bug:

Q A
Mautic version 2.8.2
PHP version 7.0

Steps to reproduce:

  1. Using docker-compose like this:
version: '2'

services:

  mautic:
    container_name: mautic
    image: mautic/mautic
    links:
      - mauticdb:mysql
    environment:
      MAUTIC_DB_HOST: mauticdb:3306
      MAUTIC_DB_PASSWORD: abcdef
    networks:
      - mautic_net

  mauticdb:
    container_name: mauticdb
    hostname: mauticdb
    image: mariadb
    environment:
      MYSQL_ROOT_PASSWORD: abcdef
    networks:
      - mautic_net

networks:
  mautic_net:
    driver: bridge
  1. Complete Installation is working via https subdomain without any problems.
  2. Create any form and use auto form injection within another ssl domains page.
  3. Problem:
    generate.js?id=1:1 Mixed Content: The page at 'https://othersite.de/page' was loaded over a secure connection, but contains a form which targets an insecure endpoint 'http://<masurl>/form/submit?formId=1'. This endpoint should be made available over a secure connection.
  4. Probably the solution: https://www.mautic.org/community/index.php/2802-mautic-http-to-https/p1#p8439
  5. If I delete the app/cache directory, site never loads again because of 'ERR_TOO_MANY_REDIRECTS'

Log errors:

docker logs:

### Change Url and Secure Cookie setting ###
172.19.0.5 - - [08/Jun/2017:10:25:32 +0000] "GET /s/dashboard HTTP/1.1" 200 50240 "https://<masurl>/s/config/edit" "Mozilla/5.0 <more UA data>"
172.19.0.5 - - [08/Jun/2017:10:25:58 +0000] "GET /s/forms?_=1496917527832&mauticUserLastActive=1&mauticLastNotificationId= HTTP/1.1" 200 25211 "https://<masurl>/s/dashboard" "Mozilla/5.0 <more UA data>"
### Rebuild forms ###
172.19.0.5 - - [08/Jun/2017:10:26:30 +0000] "POST /s/forms/batchRebuildHtml?ids=[%221%22]&mauticUserLastActive=1&mauticLastNotificationId= HTTP/1.1" 200 25854 "https://<masurl>/s/forms" "Mozilla/5.0 <more UA data>"
### DELETION of app/cache ###
172.19.0.5 - - [08/Jun/2017:10:28:13 +0000] "GET / HTTP/1.1" 301 590 "-" "Mozilla/5.0 <more UA data>"
172.19.0.5 - - [08/Jun/2017:10:28:15 +0000] "GET / HTTP/1.1" 301 590 "-" "Mozilla/5.0 <more UA data>"
172.19.0.5 - - [08/Jun/2017:10:28:15 +0000] "GET / HTTP/1.1" 301 590 "-" "Mozilla/5.0 <more UA data>"
### Repeatingly ###

mautic logs (complete after restart):

[2017-06-08 09:30:03] mautic.NOTICE: Doctrine\DBAL\Exception\TableNotFoundException: An exception occurred while executing 'SELECT p0_.id AS id_0, p0_.name AS name_1, p0_.is_published AS is_published_2, p0_.supported_features AS supported_features_3, p0_.api_keys AS api_keys_4, p0_.feature_settings AS feature_settings_5, p0_.plugin_id AS plugin_id_6 FROM plugin_integration_settings p0_ INNER JOIN plugins p1_ ON p0_.plugin_id = p1_.id':  SQLSTATE[42S02]: Base table or view not found: 1146 Table 'mautic.plugin_integration_settings' doesn't exist (uncaught exception) at /var/www/html/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php line 53 while running console command `mautic:messages:send` [] []

[2017-06-08 09:30:03] mautic.NOTICE: Doctrine\DBAL\Exception\TableNotFoundException: An exception occurred while executing 'SELECT p0_.id AS id_0, p0_.name AS name_1, p0_.is_published AS is_published_2, p0_.supported_features AS supported_features_3, p0_.api_keys AS api_keys_4, p0_.feature_settings AS feature_settings_5, p0_.plugin_id AS plugin_id_6 FROM plugin_integration_settings p0_ INNER JOIN plugins p1_ ON p0_.plugin_id = p1_.id':  SQLSTATE[42S02]: Base table or view not found: 1146 Table 'mautic.plugin_integration_settings' doesn't exist (uncaught exception) at /var/www/html/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php line 53 while running console command `mautic:broadcasts:send` [] []

[2017-06-08 09:30:03] mautic.NOTICE: Doctrine\DBAL\Exception\TableNotFoundException: An exception occurred while executing 'SELECT COUNT(*) AS dctrn_count FROM (SELECT DISTINCT id_10 FROM (SELECT m0_.is_published AS is_published_0, m0_.date_added AS date_added_1, m0_.created_by AS created_by_2, m0_.created_by_user AS created_by_user_3, m0_.date_modified AS date_modified_4, m0_.modified_by AS modified_by_5, m0_.modified_by_user AS modified_by_user_6, m0_.checked_out AS checked_out_7, m0_.checked_out_by AS checked_out_by_8, m0_.checked_out_by_user AS checked_out_by_user_9, m0_.id AS id_10, m0_.title AS title_11, m0_.description AS description_12, m0_.lists AS lists_13, m0_.network_type AS network_type_14, m0_.revision AS revision_15, m0_.stats AS stats_16, m0_.properties AS properties_17, m0_.publish_up AS publish_up_18, m0_.publish_down AS publish_down_19 FROM monitoring m0_ WHERE m0_.is_published = ? AND (m0_.publish_down IS NULL OR m0_.publish_down >= ?) AND (m0_.publish_up IS NULL OR m0_.publish_up <= ?)) dctrn_result) dctrn_table' with params [1, "2017-06-08 09:30:03", "2017-06-08 09:30:03"]:  SQLSTATE[42S02]: Base table or view not found: 1146 Table 'mautic.monitoring' doesn't exist (uncaught exception) at /var/www/html/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php line 53 while running console command `mautic:social:monitoring` [] []

[2017-06-08 09:32:02] mautic.NOTICE: Doctrine\DBAL\Exception\TableNotFoundException: An exception occurred while executing 'SELECT p0_.id AS id_0, p0_.name AS name_1, p0_.is_published AS is_published_2, p0_.supported_features AS supported_features_3, p0_.api_keys AS api_keys_4, p0_.feature_settings AS feature_settings_5, p0_.plugin_id AS plugin_id_6 FROM plugin_integration_settings p0_ INNER JOIN plugins p1_ ON p0_.plugin_id = p1_.id':  SQLSTATE[42S02]: Base table or view not found: 1146 Table 'mautic.plugin_integration_settings' doesn't exist (uncaught exception) at /var/www/html/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php line 53 while running console command `mautic:campaigns:trigger` [] []

[2017-06-08 09:35:01] mautic.NOTICE: Doctrine\DBAL\Exception\TableNotFoundException: An exception occurred while executing 'SELECT p0_.id AS id_0, p0_.name AS name_1, p0_.is_published AS is_published_2, p0_.supported_features AS supported_features_3, p0_.api_keys AS api_keys_4, p0_.feature_settings AS feature_settings_5, p0_.plugin_id AS plugin_id_6 FROM plugin_integration_settings p0_ INNER JOIN plugins p1_ ON p0_.plugin_id = p1_.id':  SQLSTATE[42S02]: Base table or view not found: 1146 Table 'mautic.plugin_integration_settings' doesn't exist (uncaught exception) at /var/www/html/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php line 53 while running console command `mautic:campaigns:rebuild` [] []

[2017-06-08 09:38:01] mautic.NOTICE: Doctrine\DBAL\Exception\TableNotFoundException: An exception occurred while executing 'SELECT l0_.is_published AS is_published_0, l0_.date_added AS date_added_1, l0_.created_by AS created_by_2, l0_.created_by_user AS created_by_user_3, l0_.date_modified AS date_modified_4, l0_.modified_by AS modified_by_5, l0_.modified_by_user AS modified_by_user_6, l0_.checked_out AS checked_out_7, l0_.checked_out_by AS checked_out_by_8, l0_.checked_out_by_user AS checked_out_by_user_9, l0_.id AS id_10, l0_.name AS name_11, l0_.description AS description_12, l0_.alias AS alias_13, l0_.filters AS filters_14, l0_.is_global AS is_global_15 FROM lead_lists l0_ ORDER BY l0_.name ASC':  SQLSTATE[42S02]: Base table or view not found: 1146 Table 'mautic.lead_lists' doesn't exist (uncaught exception) at /var/www/html/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php line 53 while running console command `mautic:segments:update` [] []

[2017-06-08 09:39:30] mautic.ERROR: SCHEMA ERROR: An exception occurred while executing 'SELECT f.alias, f.is_unique_identifer as is_unique, f.type, f.object FROM lead_fields f WHERE f.object = 'lead' ORDER BY f.field_order ASC':  SQLSTATE[42S02]: Base table or view not found: 1146 Table 'mautic.lead_fields' doesn't exist [] []

Probably related:
#4016 or https://www.mautic.org/community/index.php/7620-error-too-many-redirects-after-deleting-app-cache-directory/0

Appreciating your help :)

How to use settings from an older container and skip installation process?

I created a new mautic container to replace an older one. When I access the app, it redirects me to the installation process to fill database and admin details. Is there a way to use the settings from previous container and skip these steps? Where does mautic persist this information?

Thanks!

How to set PHP date.timezone setting?

The first time I accessed mautic, the installer recommended the following

The date.timezone setting is not set in your PHP configuration. Mautic has set the default timezone to 'UTC' but we suggest setting this in your PHP configuration.

I looked for an environment variable or something, but didn't find anything. Is there some way to control the timezone?

Cron job is not working

Hi,
I have same problem as bottom of #4.
I use docker-compose up with the config below.

version: '3'

services:
  mautic:
    image: mautic/mautic
    links:
      - mauticdb:mysql
    environment:
      - MAUTIC_DB_HOST=mysql:3306
      - MAUTIC_DB_PASSWORD=xxxx
  
  mauticdb:
    image: mysql:5.7
    volumes:
      - ./.data:/var/lib/mysql
    environment:
      MYSQL_ROOT_PASSWORD: xxxx
      
networks:
  default:
    external:
      name: internal

I try to get cron job information with commands.

root@7ae7104b05dd:/etc/cron.d# crontab -l                                                  
no crontab for root
root@7ae7104b05dd:/etc/cron.d# crontab -u www-data -l                                      
no crontab for www-data
root@7ae7104b05dd:/var/www/html# service cron status
[ ok ] cron is running.

Then, I try to run mautic commnad as user www-data. Found some error here!

root@b9e1b7c2fcdf:/var/www/html# su www-data -s /bin/sh
$ php /var/www/html/app/console mautic:segments:update

Warning: fopen(/var/www/html/app/cache/prod/../run/sf.mautic-segments-update.5415eaf7823c0a036b252ba8a9f1f4065263e1c60a23cacf6b5851144245b8c9.lock): failed to open stream: Permission denied in /var/www/html/app/bundles/CoreBundle/Command/ModeratedCommand.php on line 150

Warning: flock() expects parameter 1 to be resource, boolean given in /var/www/html/app/bundles/CoreBundle/Command/ModeratedCommand.php on line 151
Failed to lock /var/www/html/app/cache/prod/../run/sf.mautic-segments-update.5415eaf7823c0a036b252ba8a9f1f4065263e1c60a23cacf6b5851144245b8c9.lock.
Script in progress. Can force execution by using --force.

Using SSL is not secure because of gravatar

I am using the NGINX reverse proxy for SSL, and the page is not secure.

Problem:
When there is no gravatar on a profile it defaults to http to pull the default image.

Possible solution, but I cant find one.
Is there a config setting to make mautic force SSL, or something else?


Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

dockerfile not working with MAUTIC_VERSION 2.1.0

We have detected 1 major problems. You must fix them before continuing:

The /var/www/html/app/logs directory must be writable. Change the permissions of the /var/www/html/app/logs directory so that the web server can write into it.

--after build a new container with dockerfile updated for MAUTIC_VERSION 2.1.0

any ideas?

How can one specify cron intervals

Hi. Thanks for amazing work! I wonder what is the way to customise cron jobs(want to speed up things a bit, say process events every min, not 15 mins). I see that I can switch it off completely, then how should I provide this functionality from my side? It will be cool if we can somehow provide file with cron settings to the container.. I am quite new to docker(and cron too), sorry if it's obvious:)

ENV for cache path

Hi,
is it possible to add an environment variabile so to have the ability to change where the app caches?
This would be useful when deploy mautic on k8s leaving app on persistent volume and tha cache onto the pod if no replica needed.

Tnx,
Giovanni


Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

Problem with the mysql database while starting Mautic with docker-compose.yml

Hello everyone,
I am writing to tell you about a problem I had while starting Mautic with docker-compose.
After creating the file docker-compose.yml, after pasting the example code in the page dedicated to Mautic's image on the Docker Hub, I executed the command docker-compose up, and the output I received was the following:

Recreating progettodockermautic_mariadb_1 ... done
Recreating progettodockermautic_mautic_1 ... done
Attaching to progettodockermautic_mariadb_1, progettodockermautic_mautic_1
mautic_1 | warning: both MAUTIC_DB_HOST and MYSQL_PORT_3306_TCP found
mautic_1 | Connecting to MAUTIC_DB_HOST (127.0.0.1)
mautic_1 | instead of the linked mysql container
mariadb_1 | 2019-06-05 17:08:30 0 [Note] mysqld (mysqld 10.3.12-MariaDB-1:10.3.12+mariabionic) starting as process 1 ...
mautic_1 |
mautic_1 | Ensuring Mautic database is present
mautic_1 |
mautic_1 | MySQL Connection Error: (2002) Connection refused
mariadb_1 | 2019-06-05 17:08:30 0 [Note] InnoDB: Using Linux native AIO
mariadb_1 | 2019-06-05 17:08:30 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
mariadb_1 | 2019-06-05 17:08:30 0 [Note] InnoDB: Uses event mutexes
mariadb_1 | 2019-06-05 17:08:30 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
mautic_1 |
mautic_1 | Warning: mysqli::__construct(): (HY000/2002): Connection refused in /makedb.php on line 20
mariadb_1 | 2019-06-05 17:08:30 0 [Note] InnoDB: Number of pools: 1
mariadb_1 | 2019-06-05 17:08:30 0 [Note] InnoDB: Using SSE2 crc32 instructions
mariadb_1 | 2019-06-05 17:08:30 0 [Note] InnoDB: Initializing buffer pool, total size = 256M, instances = 1, chunk size = 128M
mariadb_1 | 2019-06-05 17:08:30 0 [Note] InnoDB: Completed initialization of buffer pool
mariadb_1 | 2019-06-05 17:08:30 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority().
mariadb_1 | 2019-06-05 17:08:30 0 [Note] InnoDB: 128 out of 128 rollback segments are active.
mariadb_1 | 2019-06-05 17:08:30 0 [Note] InnoDB: Creating shared tablespace for temporary tables
mariadb_1 | 2019-06-05 17:08:30 0 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
mariadb_1 | 2019-06-05 17:08:30 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB.
mariadb_1 | 2019-06-05 17:08:30 0 [Note] InnoDB: 10.3.12 started; log sequence number 1630842; transaction id 21
mariadb_1 | 2019-06-05 17:08:30 0 [Note] InnoDB: Loading buffer pool(s) from /var/lib/mysql/ib_buffer_pool
mariadb_1 | 2019-06-05 17:08:30 0 [Note] Plugin 'FEEDBACK' is disabled.
mariadb_1 | 2019-06-05 17:08:30 0 [Note] Server socket created on IP: '::'.
mariadb_1 | 2019-06-05 17:08:30 0 [Warning] 'proxies_priv' entry '@% root@73d6597df770' ignored in --skip-name-resolve mode.
mariadb_1 | 2019-06-05 17:08:30 0 [Note] Reading of all Master_info entries succeded
mariadb_1 | 2019-06-05 17:08:30 0 [Note] Added new Master_info '' to hash table
mariadb_1 | 2019-06-05 17:08:30 0 [Note] mysqld: ready for connections.
mariadb_1 | Version: '10.3.12-MariaDB-1:10.3.12+maria
bionic' socket: '/var/run/mysqld/mysqld.sock' port: 3306 mariadb.org binary distribution
mariadb_1 | 2019-06-05 17:08:30 0 [Note] InnoDB: Buffer pool(s) load completed at 190605 17:08:30
mautic_1 |
mautic_1 | Warning: mysqli::__construct(): (HY000/2002): Connection refused in /makedb.php on line 20
mautic_1 |
mautic_1 | MySQL Connection Error: (2002) Connection refused
mautic_1 |
mautic_1 | MySQL Connection Error: (2002) Connection refused
mautic_1 |
mautic_1 | Warning: mysqli::__construct(): (HY000/2002): Connection refused in /makedb.php on line 20
mautic_1 |
mautic_1 | MySQL Connection Error: (2002) Connection refused
mautic_1 |
mautic_1 | Warning: mysqli::__construct(): (HY000/2002): Connection refused in /makedb.php on line 20
mautic_1 |
mautic_1 | MySQL Connection Error: (2002) Connection refused
mautic_1 |
mautic_1 | Warning: mysqli::__construct(): (HY000/2002): Connection refused in /makedb.php on line 20
mautic_1 |
mautic_1 | Warning: mysqli::__construct(): (HY000/2002): Connection refused in /makedb.php on line 20
mautic_1 |
mautic_1 | MySQL Connection Error: (2002) Connection refused
mautic_1 |
mautic_1 | MySQL Connection Error: (2002) Connection refused
mautic_1 |
mautic_1 | Warning: mysqli::__construct(): (HY000/2002): Connection refused in /makedb.php on line 20
mautic_1 |
mautic_1 | Warning: mysqli::__construct(): (HY000/2002): Connection refused in /makedb.php on line 20
mautic_1 |
mautic_1 | MySQL Connection Error: (2002) Connection refused
mautic_1 |
mautic_1 | MySQL Connection Error: (2002) Connection refused
mautic_1 |
mautic_1 | Warning: mysqli::__construct(): (HY000/2002): Connection refused in /makedb.php on line 20
mautic_1 |
mautic_1 | Warning: mysqli::__construct(): (HY000/2002): Connection refused in /makedb.php on line 20
mautic_1 |
mautic_1 | MySQL Connection Error: (2002) Connection refused
progettodockermautic_mautic_1 exited with code 1
^CGracefully stopping... (press Ctrl+C again to force)
Stopping progettodockermautic_mariadb_1 ... done

Would anyone be kind enough to tell me how to solve?

Thank you all for any contributions

I love you, I'll buy a cat soon


Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

LDAP with Email

Hey guys,

There is an issue with sending mails to SMTP servers using LDAP auth.

The BCMath functions must be enabled to use the NTLM authenticator.

We just need to enable it in the php.ini apparently - I'll see if I can do it and push a merge

Thanks


Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

Running Cron Jobs Manually

I want to run segment updates and campaign triggers manually.
I cannot find the path to mautic installation directory.
Could you tell?

Compute SHA1 from GitHub archive instead of AWS

The following command returns "All access to this object has been disabled":

wget -O mautic.zip https://s3.amazonaws.com/mautic/releases/$current.zip

Even if it's just because I do not have access to AWS repository, since the archive is used to compute SHA1 and check in the Dockerfile that the archive downloaded is valid, it would make more sense to download the archive from the same place


Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

/var/www/html data volume?

Hi!
I am confused by the data volumes included in the documentation:

/var/www/html seems to include the application PHP code, its plugings, themes, etc.
why is it recommended to set it up as a data volume?

Where is mautic storing its data other than in Mysql?

Can it be separated from the application distribution?

How is this all going to work when pulling a new version of mautic?


Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

Mautic on Docker does not seems to work

I could not realize the source for the error but seems like Mautic docker master tag is not working and nor the instructions work. Also the listed tags exists (at least nginx).

Which is the status for this project? Should it work? Is there someone actively maintaining it?

Database not migrate

I'm using composer below, database is created but the table not generated.

`
mautic:
image: mautic/mautic
links:
- mauticdb:mysql
ports:
- 8080:80

mauticdb:
image: mysql:5.6
environment:
MYSQL_ROOT_PASSWORD: example
`

Output
[CRON] [PDOException] mautic_1 | [CRON] SQLSTATE[42S02]: Base table or view not found: 1146 Table 'mautic.lead_lists' doesn't exist

Unable to connect with TLS encryption when using custom smtp as dockerized hardware/mailserver

I use dockerized hardware/mailserver for mail purposes.
Can't setup e-mail settings in dockerized mautic: then i set smtp as custom TLS to 587 port (internal address use, or external - doesn't matter) - there are error "Unable to connect with TLS encryption"
All log here:
Unable to connect with TLS encryption Log data: ++ Starting Swift_SmtpTransport << 220 mail.myserver.com ESMTP Postfix >> EHLO email.mymautic.com << 250-mail.myserver.com 250-PIPELINING 250-SIZE 502400000 250-ETRN 250-STARTTLS 250-ENHANCEDSTATUSCODES 250-8BITMIME 250-DSN 250 SMTPUTF8 >> STARTTLS << 220 2.0.0 Ready to start TLS !! Unable to connect with TLS encryption (code: 0) ++ Starting Swift_SmtpTransport << 220 mail.myserver.com ESMTP Postfix >> EHLO email.mymautic.com << 250-mail.myserver.com 250-PIPELINING 250-SIZE 502400000 250-ETRN 250-STARTTLS 250-ENHANCEDSTATUSCODES 250-8BITMIME 250-DSN 250 SMTPUTF8 >> STARTTLS << 220 2.0.0 Ready to start TLS !! Unable to connect with TLS encryption (code: 0)

Campaign is not sending to all contacts in segment

Problem:
Only 19 out of 300 new contacts received a campaign email. It seems to hang or stop.

Using:
Mautic v2.14.0
Digital Ocean - Ubuntu 16.4 LTS
Docker/Docker Compose
(Also tested this in a Kubernetes cluster)

Steps to recreate the problem:
1.) Create a segment with a tag.
2.) Create a template email.
3.) Create a campaign that pulls the above segment and instantly sends the above email.
4.) Import 300 contacts with that specific tag.
5.) Let mautic do its thing. You will see that the contacts will be added to the campaign. Then it will say that 100% of the contacts have received the email, BUT then if you go to the email page you'll see that only a smaller percentage as actually been sent that email. In my case 19 of the 300 contacts.
(see images below)
email_page_stats
campaign_page_stats

Slow performance due to persistence

Persisting the root www folder leads to slow performance. This is in part due to the persistence of cache and logs under the www folder. It would be ideal if we could specify the directories where the caching and logging are stored as environment variables and/or if a preferred mountpoint other than the root www folder is provided.


Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

2.15 is missing as a tag in docker images

Hi,
as the actual version (2.15) is missing as a docker tag - so manually updating with using tags in docker is not possible.

And, as in the docs

Mautic Docker has two ENV that you can specify an version do start your new container:
-e MAUTIC_VERSION (Defaults to "2.15.0")

for sure? IMHO this should be
'that you can specify an version do build your new container'


Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

Composer.json missing?

I might be missing something here so feel free to correct me, but I do not understand why composer is installed but Mautic composer.json and composer.lock are not added to the container.

What's point of having composer without the project's project file ?
I know those files are not present in the archive which is downloaded but I mostly wonder if there is a reason for not adding them or if it's a mistake that should be fixed.


Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

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.