docker-mautic icon indicating copy to clipboard operation
docker-mautic copied to clipboard

Mautic 3

Open madmath03 opened this issue 4 years ago • 16 comments

Is there any plans to upgrade this docker images for Mautic 3 or would you prefer to provide the both of them ?


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

madmath03 avatar Jan 29 '20 16:01 madmath03

@luizeof any thoughts on this?

RCheesley avatar Mar 27 '20 16:03 RCheesley

@RCheesley i'm working on a container to do this ;)

luizeof avatar Mar 28 '20 20:03 luizeof

Any progress on this? Although the description on Docker hub suggests that "mautic/mautic:latest" would fetch v3, it still pulls only 2.16.0. Even pulling mautic/mautic:v3.0.0-beta (which is to be found on Docker hub in "Builds") just gives me 2.16.0.

rucksman avatar Jun 17 '20 12:06 rucksman

My fault: after cleaning up my volumes at least mautic/mautic:v3.0.0-beta did work.

rucksman avatar Jun 17 '20 13:06 rucksman

Shouldn't "latest" be 3.0.0 since it was already released?

eximius313 avatar Jun 17 '20 14:06 eximius313

Is this still maintained? Or should we rather build our own Dockerfile?

rucksman avatar Jun 24 '20 15:06 rucksman

I use mautic on the docker on my server.

What happens if I update this inside the system (/s/update)? I did this once from 2.16.2 to 2.16.3.

image

Is there a guide on how to update for docker users?

gabrielpeixoto avatar Jul 01 '20 22:07 gabrielpeixoto

I just upgrading it using the usual update script. IT fails related to #164:

Installed Mautic version: 2.16.3 PHP version: 7.1.33 OS: Linux Upgrade type: CLI

Doing pre-upgrade checks... sh: 1: mysqldump: not found One or more errors occurred during pre-upgrade checks:

  • Your server does not meet the minimum PHP requirements. Mautic requires PHP version 7.2.21 while your server has 7.1.33. Please contact your host to update your PHP installation.
  • Your MySQL/MariaDB version is not supported. You need at least MySQL 5.7.14 or MariaDB 10.2 in order to run Mautic 3.

fago avatar Jul 15 '20 12:07 fago

we have 3.1 already released

ahilles107 avatar Aug 28 '20 10:08 ahilles107

@ahilles107 docker pull mautic/mautic:v3 pulls 3.0 from docker hub. Does something need to be added/changed to pull 3.1?

ChildLearningClub avatar Sep 22 '20 09:09 ChildLearningClub

@Bellusterra

Ive been running default mautic/mautic:v3 docker - and updated to 3.1 from CLI just fine.
However not sure if this is what the recommended approach is.

It went something like this:
Get into docker: docker exec mautic bash

root@89976357efb5:/var/www/html# bin/console mautic:update:find
Version 3.1.2 of Mautic is available for download. Please visit https://github.com/mautic/mautic/releases/tag/3.1.2 for more information.
To update, you can run 'php bin/console mautic:update:apply' from the command line.


root@89976357efb5:/var/www/html# php bin/console mautic:update:apply
Are you sure you wish to update Mautic to the latest version? y
Step    5 [----->----------------------] Clearing the cache

<warning>IMPORTANT: Run the same command again with --finish. For example 'php bin/console mautic:update:apply --finish'</warning>


root@89976357efb5:/var/www/html# php bin/console mautic:update:apply --finish 
Step    2 [============================] Success! You are now running version 3.1.2 of Mautic.

linuxd3v avatar Nov 02 '20 13:11 linuxd3v

@loganto Thank you, I was not familiar with updating this way. I appreciate you taking the time to respond.

ChildLearningClub avatar Nov 03 '20 02:11 ChildLearningClub

@Bellusterra no problems. I've been interested in what is a proper way to maintain / update dockerized mautic in a long run - so I've reviewed all the opened issues. Found some details in these 2 issues:
a) https://github.com/mautic/docker-mautic/issues/2
b) https://github.com/mautic/docker-mautic/issues/90

Per maintainer:

By the way mautic is developed, I do not advise updating it just by recreating the container. Some caching and database operations are usually required. Mautic also offers a simple script that can be used to upgrade. https://github.com/mautic/mautic/blob/staging/upgrade.php

TLDR mautic mixes data (state) with code by design - in upstream.

  • Thus for a new container we cannot easily decouple data from code.
  • Thus it has only a single volume /var/www/html for combined data and code.
  • Thus we cannot create stateless mautic container with just new version of the code.
  • Thus as end consumers we cannot simply pull lets say new version of the mautic, ex mautic:3.1.2, just have it run an update in the background and just get a new version.

Basically you cant/shouldnt update by updating container version. From what I gather - expected official update mechanism is to use either update via UI or cli update:
https://docs.mautic.org/en/setup/updating-at-command-line Container only have to be updated if mautic version requires new PHP version or something, or some new system library that's needed. It would have been great to add this point about updates to docker readme (cc @luizeof ).

There are some articles online withhelpful tips: https://mauteam.org/mautic/mautic-admins/mautic-update-how-to-dont-click-that-button/

Im just hoping updating by updating a container becomes possible in a future as it's most common approach.

linuxd3v avatar Nov 05 '20 20:11 linuxd3v

Any update on this topic? mautic/mautic:latest does still pull 2.16.2

And running the upgrade on the console does also not work because the image of 2.16.2 does have an outdated php version :-( I could only update there at least to version 2.16.3 with the console tasks. Upgrade to v3 fails. (afterwards I had to o back to 2.16.2 with my backup because after a restart of the container I ended up in just a white page (http error 500) probably because the container is still 2.16.2 and the data files were 2.16.3) When will the container for 2.16.3 be released with hopefully a new php version so that the upgrade to v3 can be done?

root@xyz:/var/xyz/mautic# docker-compose exec mautic php app/console mautic:update:apply
Sind Sie sicher, dass Sie Mautic  zur neuesten Version aktualisieren möchten? yes
Step    1 [->--------------------------] Update Information wird geladen...

You can only upgrade to Mautic 3 by running 'php upgrade_v3.php' instead of this command.


root@xyz:/var/xyz/mautic# docker-compose exec mautic php upgrade_v3.php
Welcome to the Mautic 3 upgrade script! Before we start, we'll run some pre-upgrade checks to make sure your system is compatible.
IMPORTANT: you will need to update your cron jobs from app/console/* to bin/console/* after the upgrade. You can already change them now if you want.
Please type 'yes' if you're ready to start: yes

Thank you, continuing...
===== STARTING MAUTIC 3 UPGRADE AT 2020-11-21 20:25:09... =====
Installed Mautic version:       2.16.3
PHP version:                            7.1.33
OS:                                                     Linux
Upgrade type:                           CLI

Doing pre-upgrade checks...
sh: 1: mysqldump: not found
One or more errors occurred during pre-upgrade checks:
- Your server does not meet the minimum PHP requirements. Mautic requires PHP version 7.2.21 while your server has 7.1.33. Please contact your host to update your PHP installation.

- Your MySQL/MariaDB version is not supported. You need at least MySQL 5.7.14 or MariaDB 10.2 in order to run Mautic 3.

Actually the database in my installation is already MariaDB 10.5.8 (so that second error does not seem to be correct)

GuidoDr avatar Nov 21 '20 20:11 GuidoDr

@GuidoDr per dockerhub page: https://hub.docker.com/r/mautic/mautic

If you want to pull the latest stable image from Mautic 3 Series on DockerHub:

docker pull mautic/mautic:v3

Note that during the 3.0.x period, the 'mautic/mautic:latest' tag still refers to Mautic 2 for backward compatibility. If you intend to use Mautic 2, use the 'mautic/mautic:v2' tag instead of 'mautic/mautic:latest'.

linuxd3v avatar Nov 23 '20 12:11 linuxd3v

Hi all, similar issue. Trying to upgrade Mautic in Docker from 2.16.2 to ideally 3.

After entering into the Mautic container, I ran php app/console mautic:update:find and php bin/console mautic:update:apply. It confirmed that Mautic 2.16.5 was upgraded successfully, but before continuing to upgrade to version 3.2.4, I tried accessing the Mautic instance from the browser but was unsuccessful. I got the following message. :(

image

I tried clearing cache by running php app/console cache:clear, but that didn't seem to change anything. Also, took a look at /var/www/html/app/config/local.php, but not sure if there is anything that needs to be changed there.

Any ideas on what broke it and how to fix or further troubleshoot this?

Thank you!

UPDATE: This only fixed the issue upgrade to 2.16.5. Mautic from the browser is working now after I updated the permissions of /var/www/html/app/cache/prod. I checked the log files in /var/www/html/app/logs and noticed that there were some errors creating or trying to write to the .../cache/prod directory, so then I checked ownership and realized it didn't have the www-data permissions. From /var/www/html: Ran sudo chown -R www-data:www-data /app/cache/prod and sudo chmod -R 755 /app/cache/prod then sudo -u www-data php app/console cache:clear And now I can access mautic from the browser.

jenshine avatar Jul 07 '21 08:07 jenshine