From 82f2ced8e8a64856f6450d6f724908851784eb05 Mon Sep 17 00:00:00 2001 From: cibero42 Date: Tue, 22 Jul 2025 17:33:26 +0200 Subject: [PATCH 01/12] fix port to not induce errors --- examples/basic/docker-compose.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/basic/docker-compose.yml b/examples/basic/docker-compose.yml index 73416072..a9aa1167 100644 --- a/examples/basic/docker-compose.yml +++ b/examples/basic/docker-compose.yml @@ -30,7 +30,7 @@ services: links: - db:mysql ports: - - 1111:80 + - 8080:80 volumes: *mautic-volumes environment: From 43664ec9983dedbbcadf82b1cb160c03595bf6de Mon Sep 17 00:00:00 2001 From: cibero42 Date: Tue, 12 Aug 2025 14:15:52 +0200 Subject: [PATCH 02/12] Fix 437 --- common/entrypoint_mautic_web.sh | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/common/entrypoint_mautic_web.sh b/common/entrypoint_mautic_web.sh index 8d0d5877..adea5fab 100644 --- a/common/entrypoint_mautic_web.sh +++ b/common/entrypoint_mautic_web.sh @@ -1,5 +1,7 @@ #!/bin/bash +source /startup/logger.sh + # prepare mautic with test data if [ "$DOCKER_MAUTIC_LOAD_TEST_DATA" = "true" ]; then su -s /bin/bash $MAUTIC_WWW_USER -c "php $MAUTIC_CONSOLE doctrine:migrations:sync-metadata-storage" @@ -9,7 +11,12 @@ if [ "$DOCKER_MAUTIC_LOAD_TEST_DATA" = "true" ]; then fi # run migrations -su -s /bin/bash $MAUTIC_WWW_USER -c "php $MAUTIC_CONSOLE doctrine:migration:migrate -n" +if php -r "include('${MAUTIC_VOLUME_CONFIG}/local.php'); exit(isset(\$parameters['site_url']) ? 0 : 1);"; then + log "[${DOCKER_MAUTIC_ROLE}]: Mautic is already installed, running migrations..." + su -s /bin/bash $MAUTIC_WWW_USER -c "php $MAUTIC_CONSOLE doctrine:migration:migrate -n" +else + log "[${DOCKER_MAUTIC_ROLE}]: Mautic is not installed, skipping migrations." +fi # execute the provided entrypoint "$@" From 15040f4fab8391e244db1aca129aa2999acf87a9 Mon Sep 17 00:00:00 2001 From: Kiart Tantasi <76615399+kiart-tantasi@users.noreply.github.com> Date: Fri, 15 Aug 2025 15:56:47 +0700 Subject: [PATCH 03/12] bookworm --- apache/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apache/Dockerfile b/apache/Dockerfile index 9bd6229a..22562bdb 100644 --- a/apache/Dockerfile +++ b/apache/Dockerfile @@ -1,4 +1,4 @@ -FROM php:8.3-apache AS builder +FROM php:8.3-apache-bookworm AS builder # Copy everything from common for building COPY ./common/ /common/ From ad8611164b886b006b6efe72a09592d9d6d866ac Mon Sep 17 00:00:00 2001 From: Kiart Tantasi <76615399+kiart-tantasi@users.noreply.github.com> Date: Fri, 15 Aug 2025 15:57:40 +0700 Subject: [PATCH 04/12] bookworm to fpm --- fpm/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fpm/Dockerfile b/fpm/Dockerfile index d7093a41..a909ddce 100644 --- a/fpm/Dockerfile +++ b/fpm/Dockerfile @@ -1,4 +1,4 @@ -FROM php:8.3-fpm AS builder +FROM php:8.3-fpm-bookworm AS builder # Copy everything from common for building COPY ./common/ /common/ From ccad5aeb90a94bce2f3df4346d60cac78f004661 Mon Sep 17 00:00:00 2001 From: Kiart Tantasi <76615399+kiart-tantasi@users.noreply.github.com> Date: Fri, 15 Aug 2025 16:10:38 +0700 Subject: [PATCH 05/12] second stage --- apache/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apache/Dockerfile b/apache/Dockerfile index 22562bdb..99a731d3 100644 --- a/apache/Dockerfile +++ b/apache/Dockerfile @@ -63,7 +63,7 @@ RUN cd /opt && \ rm -rf /opt/mautic/var/cache/js && \ find /opt/mautic/node_modules -mindepth 1 -maxdepth 1 -not \( -name 'jquery' -or -name 'vimeo-froogaloop2' \) | xargs rm -rf -FROM php:8.3-apache +FROM php:8.3-apache-bookworm LABEL vendor="Mautic" LABEL maintainer="Mautic core team <>" From cc6851e24c42de86bb92f276439935be5c811199 Mon Sep 17 00:00:00 2001 From: Kiart Tantasi <76615399+kiart-tantasi@users.noreply.github.com> Date: Fri, 15 Aug 2025 16:11:49 +0700 Subject: [PATCH 06/12] second stage --- fpm/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fpm/Dockerfile b/fpm/Dockerfile index a909ddce..cf807cce 100644 --- a/fpm/Dockerfile +++ b/fpm/Dockerfile @@ -63,7 +63,7 @@ RUN cd /opt && \ rm -rf /opt/mautic/var/cache/js && \ find /opt/mautic/node_modules -mindepth 1 -maxdepth 1 -not \( -name 'jquery' -or -name 'vimeo-froogaloop2' \) | xargs rm -rf -FROM php:8.3-fpm +FROM php:8.3-fpm-bookworm LABEL vendor="Mautic" LABEL maintainer="Mautic core team <>" From 7c65c0903f6674a9a03632cc261253fedff0d3aa Mon Sep 17 00:00:00 2001 From: Renato <102629460+cibero42@users.noreply.github.com> Date: Fri, 15 Aug 2025 11:36:51 +0200 Subject: [PATCH 07/12] Update common/entrypoint_mautic_web.sh MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Martin Vooremäe --- common/entrypoint_mautic_web.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/entrypoint_mautic_web.sh b/common/entrypoint_mautic_web.sh index adea5fab..3b40af21 100644 --- a/common/entrypoint_mautic_web.sh +++ b/common/entrypoint_mautic_web.sh @@ -13,7 +13,7 @@ fi # run migrations if php -r "include('${MAUTIC_VOLUME_CONFIG}/local.php'); exit(isset(\$parameters['site_url']) ? 0 : 1);"; then log "[${DOCKER_MAUTIC_ROLE}]: Mautic is already installed, running migrations..." - su -s /bin/bash $MAUTIC_WWW_USER -c "php $MAUTIC_CONSOLE doctrine:migration:migrate -n" + su -s /bin/bash $MAUTIC_WWW_USER -c "php $MAUTIC_CONSOLE doctrine:migrations:migrate -n" else log "[${DOCKER_MAUTIC_ROLE}]: Mautic is not installed, skipping migrations." fi From 46964ea2abe3047847cd1ea1a160e20ba764ac9e Mon Sep 17 00:00:00 2001 From: Renato <102629460+cibero42@users.noreply.github.com> Date: Fri, 15 Aug 2025 11:38:39 +0200 Subject: [PATCH 08/12] Update common/entrypoint_mautic_web.sh MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Martin Vooremäe --- common/entrypoint_mautic_web.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/entrypoint_mautic_web.sh b/common/entrypoint_mautic_web.sh index 3b40af21..70da7208 100644 --- a/common/entrypoint_mautic_web.sh +++ b/common/entrypoint_mautic_web.sh @@ -11,7 +11,7 @@ if [ "$DOCKER_MAUTIC_LOAD_TEST_DATA" = "true" ]; then fi # run migrations -if php -r "include('${MAUTIC_VOLUME_CONFIG}/local.php'); exit(isset(\$parameters['site_url']) ? 0 : 1);"; then +if php -r "include('${MAUTIC_VOLUME_CONFIG}/local.php'); exit(!empty(\$parameters['db_driver']) && !empty(\$parameters['site_url']) ? 0 : 1);"; then log "[${DOCKER_MAUTIC_ROLE}]: Mautic is already installed, running migrations..." su -s /bin/bash $MAUTIC_WWW_USER -c "php $MAUTIC_CONSOLE doctrine:migrations:migrate -n" else From bf1ae57d4ede12bd7b5406ce897126028e38a64a Mon Sep 17 00:00:00 2001 From: cibero42 Date: Fri, 15 Aug 2025 11:48:40 +0200 Subject: [PATCH 09/12] update wait_for_install --- common/startup/wait_for_mautic_install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/startup/wait_for_mautic_install.sh b/common/startup/wait_for_mautic_install.sh index 7b2a1725..cbbcb513 100644 --- a/common/startup/wait_for_mautic_install.sh +++ b/common/startup/wait_for_mautic_install.sh @@ -4,7 +4,7 @@ source /startup/logger.sh function wait_for_mautic_install { local COUNTER=0 - until php -r "include('${MAUTIC_VOLUME_CONFIG}/local.php'); exit(isset(\$parameters['site_url']) ? 0 : 1);"; do + until php -r "include('${MAUTIC_VOLUME_CONFIG}/local.php'); exit(!empty(\$parameters['db_driver']) && !empty(\$parameters['site_url']) ? 0 : 1);"; do log_debug "[${DOCKER_MAUTIC_ROLE}]: Waiting for Mautic to be installed, current attempt: ${COUNTER}." # only show message every 30 seconds (or DEBUG is enabled) if (( COUNTER % 6 == 0 )); then From bf222feb64e79ce12d30efa45ae0488748d685f3 Mon Sep 17 00:00:00 2001 From: "allcontributors[bot]" <46447321+allcontributors[bot]@users.noreply.github.com> Date: Fri, 15 Aug 2025 09:59:31 +0000 Subject: [PATCH 10/12] docs: update README.md [skip ci] --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 865077fb..0c828e46 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Official Mautic Docker Image -[![All Contributors](https://img.shields.io/badge/all_contributors-12-orange.svg?style=flat-square)](#contributors-) +[![All Contributors](https://img.shields.io/badge/all_contributors-13-orange.svg?style=flat-square)](#contributors-) > [!NOTE] @@ -213,6 +213,7 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d maxitromer
maxitromer

💻 ⚠️ Nick Vanpraet
Nick Vanpraet

👀 Marko Korhonen
Marko Korhonen

💻 + Kiart Tantasi
Kiart Tantasi

💻 From edc86a3992f9c48aca72c7ab283b25091ff4faa0 Mon Sep 17 00:00:00 2001 From: "allcontributors[bot]" <46447321+allcontributors[bot]@users.noreply.github.com> Date: Fri, 15 Aug 2025 09:59:32 +0000 Subject: [PATCH 11/12] docs: update .all-contributorsrc [skip ci] --- .all-contributorsrc | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.all-contributorsrc b/.all-contributorsrc index 1972dd60..652dd0f1 100644 --- a/.all-contributorsrc +++ b/.all-contributorsrc @@ -119,6 +119,15 @@ "contributions": [ "code" ] + }, + { + "login": "kiart-tantasi", + "name": "Kiart Tantasi", + "avatar_url": "https://avatars.githubusercontent.com/u/76615399?v=4", + "profile": "https://www.petchblog.net/", + "contributions": [ + "code" + ] } ], "contributorsPerLine": 7, From d3b1ca3ac5e34fd3231b3a9aa695e63f23b8dd9c Mon Sep 17 00:00:00 2001 From: cibero42 Date: Fri, 15 Aug 2025 12:10:45 +0200 Subject: [PATCH 12/12] fix volume permissions --- common/docker-entrypoint.sh | 6 +++++- common/startup/check_volumes_exist_ownership.sh | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/common/docker-entrypoint.sh b/common/docker-entrypoint.sh index a1d2f091..c5f778ee 100644 --- a/common/docker-entrypoint.sh +++ b/common/docker-entrypoint.sh @@ -12,6 +12,8 @@ export MAUTIC_DB_PORT="${MAUTIC_DB_PORT:-3306}" export MAUTIC_VOLUME_CONFIG="${MAUTIC_VOLUME_CONFIG:-/var/www/html/config}" export MAUTIC_VOLUME_LOGS="${MAUTIC_VOLUME_LOGS:-/var/www/html/var/logs}" export MAUTIC_VOLUME_MEDIA="${MAUTIC_VOLUME_MEDIA:-/var/www/html/docroot/media}" +export MAUTIC_VOLUME_FILES="${MAUTIC_VOLUME_FILES:-/var/www/html/docroot/media/files}" +export MAUTIC_VOLUME_IMAGES="${MAUTIC_VOLUME_IMAGES:-/var/www/html/docroot/media/images}" export MAUTIC_VAR="${MAUTIC_VAR:-/var/www/html/var}" export MAUTIC_CONSOLE="${MAUTIC_CONSOLE:-/var/www/html/bin/console}" @@ -25,7 +27,9 @@ export MAUTIC_VOLUMES="\ ${MAUTIC_VOLUME_CONFIG} \ ${MAUTIC_VAR} \ ${MAUTIC_VOLUME_LOGS} \ -${MAUTIC_VOLUME_MEDIA}" +${MAUTIC_VOLUME_MEDIA} \ +${MAUTIC_VOLUME_FILES} \ +${MAUTIC_VOLUME_IMAGES} " export REQUIRED_MAUTIC_VARIABLES="\ MAUTIC_DB_HOST \ diff --git a/common/startup/check_volumes_exist_ownership.sh b/common/startup/check_volumes_exist_ownership.sh index c522d38b..5e57e9f2 100644 --- a/common/startup/check_volumes_exist_ownership.sh +++ b/common/startup/check_volumes_exist_ownership.sh @@ -13,7 +13,7 @@ function check_volumes_exist_ownership { if [[ $ERROR_FOUND -eq 1 ]]; then log_startup_error_header - log_error "Please ensure the volume(s) are mounted correctly and is accessible." + log_error "Please ensure the volume(s) is mounted correctly and is accessible." log_error "If you are running this container as a non-root user, you may need to run the container with elevated privileges." exit 1 fi