mailcow / mailcow-dockerized

mailcow: dockerized - 🐮 + 🐋 = 💕
https://mailcow.email
GNU General Public License v3.0
8.34k stars 1.13k forks source link

SOGo creates random docker volume #1751

Open ntimo opened 5 years ago

ntimo commented 5 years ago

Hello, I just noticed that SOGo after the update from today evening creates a random Docker volume this volume is not named with the mailcow name scheme. Even worse when mailcow gets restarted new volume is created and the old one is not deleted. Why does this happen, and why not use a static image name like mailcowdockerized_sogo-vol-1

bildschirmfoto 2018-09-09 um 21 57 37 bildschirmfoto 2018-09-09 um 21 58 49
mkuron commented 5 years ago

Caused by 8a88514. I guess it‘s correct to not use a named volume since it does not store persistent data. Also, using a named volume would cause trouble with SOGo updates as the contents of the volume might not get updated automatically.

However, it’s indeed not so nice that it doesn’t get cleaned up. Using tmpfs for this purpose would make sense, but tmpfs can’t be shared between containers. Maybe @andryyy has an idea how to solve this.

andryyy commented 5 years ago

I'll try to find a solution.

ntimo commented 5 years ago

Hello again, @andryyy do you already have a solution for this :) My docker volume list is getting quite cluttered.

bildschirmfoto 2018-10-20 um 20 17 29
stale[bot] commented 5 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

ntimo commented 5 years ago

Hello @andryyy are you still looking into this or can I/the bot close the issue? :)

andryyy commented 5 years ago

Still thinking about a solution. :)

stale[bot] commented 5 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

andryyy commented 5 years ago

image

ntimo commented 5 years ago

@andryyy Could it be a solution to create a new volume called sogo-vol-1 and mount it to /usr/lib/GNUstep/SOGo/ inside of the SOGo and NGINX container? I tested this on my backup mx and it worked pretty well. I can create a PR if you want.

andryyy commented 5 years ago

It works as long as the web statics are not updated.

A very ugly fix would be to rsync the web docs to a sogo-web-vol-1 volume.

ntimo commented 5 years ago

Or maybe somehow (entrypoint?) delete the content of the volume every time the Sogo container is restarted.

andryyy commented 5 years ago

It is empty then, the content is not updated.

ntimo commented 5 years ago

As far as I know, when the SOGo container starts, it will generate all the files that are nessary. This would make it possible to regenerate them at container startup. We only need to remove them first.

andryyy commented 5 years ago

How would it do that? You need to reinstall SOGo to get those files back.

andryyy commented 5 years ago

As much as I hate myself for it: I created a named volume and rsync the 50 M of content...

We need to find a better fix in the future.

VermiumSifell commented 1 year ago

@DerLinkman Is this sitill an issue?