Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mautic seems to reinstall intself after taking pod down #271

Open
aleskinen opened this issue Mar 27, 2024 · 1 comment
Open

Mautic seems to reinstall intself after taking pod down #271

aleskinen opened this issue Mar 27, 2024 · 1 comment

Comments

@aleskinen
Copy link

aleskinen commented Mar 27, 2024

I have tried both with whole html as persistent, and suggested config/logs/media. If I only use recommended folders, mautic seems to redirect forever. I I'll use whole html as persistent, it will reinstall itself after every deployment. I am using apache version. If I take tar of html and restore it after deployment works, but still gets reinstalled. How to stop mautic from reinstalling itself after deployment? I am using current apache version 5 from docker hub.

@wayneoutthere
Copy link

wayneoutthere commented Oct 28, 2024

I can confirm 100% you are correct and i'm using Podman. I fought this for literally 20 hours. What happened was this:

———

WHAT WAS HAPPENING

Everything went well on initial podman-compose up -d command but here is the flow of what I did and where I finally got stumped:

podman stop webserver <- simply stopped container
localhost:8890 <-test connection - dead as expected (webserver is down)
podman-compose up -d <- was expecting this to create a problem like before, but it didnt...
localhost:8890 <-test connection - worked as expected
podman stop mysql <-simply stopped the database container
localhost:8890 <- test connection, dead as expected (db down)
podman-compose up-d <- was expecting fail, but again it worked, no data lost
localhost:8890 <-test connection - worked as expected
podman-compose down <- tears down BOTH containers to the ground
podman-compose up -d <- Build both containers back up (they are both in same podman-compose.yaml file) - starts up BOTH containers
localhost:8890 <- Test connection. Back to the initial installer / db connection page. After running through install page and connecting to database again with same credentials, no data is found, all data is lost.

When I ran podman volume ls I would have the two named volumes and 3 random hash-like volumes which were not able to keep any of the configs, logs, etc, effectively killing the persistence of the container.

SOLUTION

final solution was from a wonderful community member in the podman community matrix group who gave me this to add to my compose.yml file:

mautic:
  volumes:
    - mautic_config:/var/www/html/config
    - mautic_logs:/var/www/html/var/logs
    - mautic_media:/var/www/html/docroot/media
volumes:
  mautic_config:
  mautic_logs:
  mautic_media:

By adding these three extra volumes which mautic requires, everything now works as expected.

I can now do both podman-compose up -d and podman-compose down and everything goes up and down again with persistence.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants