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

Multiply instances #2796

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Multiply instances #2796

wants to merge 2 commits into from

Conversation

gmarke
Copy link
Contributor

@gmarke gmarke commented Jul 19, 2019

As I already mentioned before in issue created some time ago => with this solution it's possible to run multiply instances of mailcow on one host.

All is about to consider COMPOSE_PROJECT_NAME when selecting data from docker api.

in this commit I made some review and change it in all files where CONTENER_D is assigned.

Please merge this in to project ==> this is not impacting any security or performance part it's just extended select.

@mkuron
Copy link
Member

mkuron commented Jul 19, 2019

The original pull request, #2755, only dealt with php-fpm and had to be reverted because it resulted in an invalid select statement. Clearly, this pull request needs to be properly tested before merging.

@andryyy
Copy link
Contributor

andryyy commented Jul 19, 2019

Yes, we can only merge if it is fully tested. The last PR did not address all problems, just like this does not cover all problems with multiple mailcows on a single host (netfilter for example).

Someone needs to pull and test, I will not try it again, as I don't see an advantage anyway. :(
Is this even safe to use with every compose version?

@mkuron
Copy link
Member

mkuron commented Jul 19, 2019

Is this even safe to use with every compose version?

Good point. I think the first version that supports config format 2.1 was docker-compose 1.9 from three years ago. We need to test whether that already adds the necessary attributes to the containers.

just like this does not cover all problems with multiple mailcows on a single host

I expect we‘ll get there eventually. If @gmarke really wants to do this, he‘ll need to find and fix the other problems too. But I think it‘s fine if he posts small pull requests like this one that fix issues as he finds them. As long as they don‘t change behavior on regular mailcows.

@andryyy
Copy link
Contributor

andryyy commented Jul 19, 2019

Yes, that's true.

When I find more time, I will try to contribute and fix netfilter-mailcow.

@mkuron mkuron mentioned this pull request Jul 21, 2019
@melihsd
Copy link

melihsd commented Jul 21, 2019

This is working perfectly fine for me;
I tested my already existing systems and did emailing, attachments etc. but not ipv6 yet;
But its working fairly well without any errors.

grafik

Hope it will get merged soon and also the ipv6 problem will get solved.

I may setup a test system with 10 installations to see if there will be any problems.

@gmarke
Copy link
Contributor Author

gmarke commented Jul 23, 2019

Cool ProJaCore ;)
Finally someone interested about this solution..
If you describe what is about concerning ipv6 maybe I can do something..

@djdomi
Copy link

djdomi commented Aug 22, 2019

i am interessted, but more in a solution to create an mailcow cluster on different hosts, because i want to have an active/backup situation without re-creating all accesses/domains on the backup-mx

@mkuron
Copy link
Member

mkuron commented Aug 22, 2019

@djdomi, high availability is a completely different thing. There is a separate issue for that.

@djdomi
Copy link

djdomi commented Aug 22, 2019 via email

@andryyy
Copy link
Contributor

andryyy commented Aug 22, 2019

Not planned in the open source mailcow. If you want to provide a PR, go ahead.

@djdomi
Copy link

djdomi commented Aug 22, 2019

Not planned in the open source mailcow. If you want to provide a PR, go ahead.

Hm, maybe theres an idea: You can create a site for export all domains for an import of backup-mx i t hink that would be the easiest way at all?

@patschi
Copy link
Member

patschi commented Aug 22, 2019

In general issue #241 might be more related for this kind of feature request.

Hm, maybe theres an idea: You can create a site for export all domains for an import of backup-mx i t hink that would be the easiest way at all?

There's a way to retrieve all domains from a mailcow instance using the API:

case "domain":
switch ($object) {
case "all":
$domains = mailbox('get', 'domains');
if (!empty($domains)) {
foreach ($domains as $domain) {
if ($details = mailbox('get', 'domain_details', $domain)) {
$data[] = $details;
}
else {
continue;
}
}
process_get_return($data);
}

So you might be able to script that part yourself.

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

Successfully merging this pull request may close these issues.

7 participants