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

Docker Compose v2 #4315

Closed
chriscroome opened this issue Nov 8, 2021 · 21 comments
Closed

Docker Compose v2 #4315

chriscroome opened this issue Nov 8, 2021 · 21 comments

Comments

@chriscroome
Copy link
Contributor

chriscroome commented Nov 8, 2021

Docker Compose v2 is available and compose-switch can be used via alternatives on Debian based distros to convert docker-compose commands to docker compose commands, I realise that the Mailcow update.sh script checks the version to use via this URL and I don't think this is an urgent or critical issue but I thought it probably deserved a feature request opening as some work might be needed in the future to update the way Mailcow installs and updates Docker Compose.

@MAGICCC
Copy link
Member

MAGICCC commented Nov 9, 2021

Indeed its released and there's still an issue on compose side with IPv6: docker/compose#8721
Also I will link some closed issues here too: #4285 #4280

@nightah
Copy link
Contributor

nightah commented Nov 23, 2021

docker/compose#8721 can be worked around but surrounding ipv6 literals with square brackets and double quotes, which is common for Go applications.

The key issue which prevented IPv6 routing from working was docker/compose#8851 which has been resolved and merged in a newer version.

@HorayNarea
Copy link
Contributor

Now that there are no (known 😅) bugs preventing the migration to v2… is there a plan to do this, maybe even a rough estimate when this will happen?

@StarkZarn
Copy link

It doesn't look like there are any issues preventing this migration. I'll echo what the above poster asked, is there a plan for this? It would increase support for arm-based setups.

@andryyy
Copy link
Contributor

andryyy commented Jan 22, 2022

Am I missing something? Supporting v2 does help support ARM? ☺️

@StarkZarn
Copy link

StarkZarn commented Jan 22, 2022

Am I missing something? Supporting v2 does help support ARM? ☺️

Since compose v2 is in GO, there's native arm support. I know there was arm support from the pip package version of docker-compose v1, but it wasn't officially supported by docker, hence not having an arm release in the official packages.

It's just all-around better in my experience so far.

@spantaleev
Copy link
Contributor

#4285 is still a problem, for which I've found some workaround.

I don't use IPv6, so I'm not hitting any other issues besides #4285 with Compose v2 + compose-switch so far.


Another minor issue (annoyance) with doing docker-compose up with Compose v2 is what I've fixed in #4457

MAGICCC pushed a commit that referenced this issue Feb 8, 2022
By default, `.env` (`mailcow.conf`) does not define `WATCHDOG_NOTIFY_EMAIL`.

Using it in `docker-compose.yml` without having it defined leads to Compose v2 displaying this warning on startup:

> WARNING: The WATCHDOG_NOTIFY_EMAIL variable is not set. Defaulting to a blank string.

Related to #4315
DerLinkman added a commit that referenced this issue Mar 2, 2022
* [API] Fix minor issue in api docs

* [GH-Actions][stale] Add neverstale label to exempt list

* [Web] add github version tag

* [Web] add github version tag

* [Web] add github version tag

* [Web] add github version tag

* [Web] add github version tag

* [Web] add github version tag error handling

* [Web] add github version tag error handling

* Passwordless SOGo auth: support for calendar invitations and calendar/contacts subscriptions

Inviting someone to a calendar event triggers a request to /SOGo/so/[email protected]/freebusy.ifb/ajaxRead. Subscribing to someone's calendar/contacts triggers a request to /SOGo/so/[email protected]/foldersSearch. The email address in the URL is different from the logged-in user, which needs to be handled appropriately by sogo-auth.php.

* [Web] add github version tag - adjust css

* [Compose] Update SOGo Autoreply Schedule to 5m

Based on the advice of inverse (SOGo developer). Thanks to https://github.com/jmber

Closes: #4436

* [Web] add github version tag - move twig globals

* [Web] add github version tag - missing </div>

* Passwordless SOGo auth: improvements for when accessing other users

* [WebAuthn] fido2 passwordless auth - fix (#4440)

* [WebAuthn] fido2 revert

* [WebAuthn] set UV flags to 'discouraged'

* [WebAuthn] revert - set UV flags to 'discouraged'

* Update clamav to 0.104.2

* Update clamav to 0.104.2

* Update dovecot to 2.3.18

Update gosu to 1.14
Use debian bullseye as base

* [Web] Updated lang.es.json [CI SKIP] (#4453)

Co-authored-by: Fijxu <[email protected]>
Co-authored-by: milkmaker <[email protected]>

Co-authored-by: Fijxu <[email protected]>

* Fix broken documentation links (#4458)

* Fix broken documentation links

* Fix a few more broken documentation links

* Fix broken documentation links in translation files

* Fall back to empty string if WATCHDOG_NOTIFY_EMAIL undefined (#4457)

By default, `.env` (`mailcow.conf`) does not define `WATCHDOG_NOTIFY_EMAIL`.

Using it in `docker-compose.yml` without having it defined leads to Compose v2 displaying this warning on startup:

> WARNING: The WATCHDOG_NOTIFY_EMAIL variable is not set. Defaulting to a blank string.

Related to #4315

* [Web] Updated lang.sk.json [CI SKIP] (#4461)

Co-authored-by: Lukáš Matula <[email protected]>
Co-authored-by: milkmaker <[email protected]>

Co-authored-by: Lukáš Matula <[email protected]>

* oletools: disable template injection detection (#4464)

Seems to be causing a lot of false positives lately

* Fix minor typo in comment (#4466)

Correction of the comment, so that the explanation is correct and can be understood.

* Update issue templates to issue forms (#4465)

This PR updates the issue templates to GitHubs new issue forms

* [Web] Fix padding issue in UI admin panel (#4481)

* [Web] fix admin panel padding issue

* [Web] fix admin panel padding issue

* [Web] Updated lang.sk.json [CI SKIP] (#4489)

Co-authored-by: Lukáš Matula <[email protected]>
Co-authored-by: milkmaker <[email protected]>

Co-authored-by: Lukáš Matula <[email protected]>

* increase opcache.interned_strings_buffer to 16 (#4487)

since version 23.0.2 Nextcloud recommends having a value greater than 8 for `opcache.interned_strings_buffer`. As this memory will be only used when needed this should have no impact on installations that are not using nextcloud.

related discussion: https://help.nextcloud.com/t/nextcloud-23-02-opcache-interned-strings-buffer/134007/19
related nextcloud issue: nextcloud/server#31223

* nextcloud - add missing redirections (#4366)

adds missing location directives to the nginx configuration of nextcloud 22, to prevent warnings in nextcloud admin center of missing redirections

* Update imapsync to 2.178 (#4491)

* Update and fix oletools (#4479)

As noticed by @MAGICCC (#4464 (comment)), our olefy image does not work anymore if you rebuild it. This is because @HeinleinSupport recently updated their repository with the changes from @decalage2's repository, which renamed olvba3 to olevba. Since @HeinleinSupport does not recommend using its own patched branch and is very slow in pulling in changes from upstream (@decalage2), let's switch to the latter. This also allowed me to revert #4464.

Finally, a minor patch to rspamd is necessary. While the documentation says

In the extended mode the oletools module will not trigger on specific categories, but will always set a threat string with all found flags when at least a macro was found.

This is not actually true -- it only sets it when suspicious or autoexec threats were detected. But it's a one-line patch to make rspamd behave as documented and we should submit that patch to @rspamd too. With this patch, I have confirmed that Mailcow will reject any incoming, non-whitelisted message containing attachments with macros.

* [Web] Fix excluded domain list in quaratine view

Previously excluded domains from quarantine were not shown.

* [Dovecot] Update syslogng Version to 3.28 (#4496)

Co-authored-by: Niklas Meyer <[email protected]>

Co-authored-by: ntimo <[email protected]>
Co-authored-by: Peter <[email protected]>
Co-authored-by: FreddleSpl0it <[email protected]>
Co-authored-by: FreddleSpl0it <[email protected]>
Co-authored-by: Michael Kuron <[email protected]>
Co-authored-by: milkmaker <[email protected]>
Co-authored-by: Fijxu <[email protected]>
Co-authored-by: Slavi Pantaleev <[email protected]>
Co-authored-by: Lukáš Matula <[email protected]>
Co-authored-by: Max <[email protected]>
Co-authored-by: Michael Cramer <[email protected]>
Co-authored-by: Robert Christian <[email protected]>
Co-authored-by: André <[email protected]>
Co-authored-by: Niklas Meyer <[email protected]>
@aminvakil
Copy link
Contributor

How about setting both HTTP_BIND and HTTPS_BIND by default to 0.0.0.0?

@MAGICCC
Copy link
Member

MAGICCC commented Mar 30, 2022

Something like that then

- "${HTTPS_BIND:-:}:${HTTPS_PORT:-443}:${HTTPS_PORT:-443}"
- "${HTTP_BIND:-:}:${HTTP_PORT:-80}:${HTTP_PORT:-80}"
+ "${HTTPS_BIND:-0.0.0.0}:${HTTPS_PORT:-443}:${HTTPS_PORT:-443}"
+ "${HTTP_BIND:-0.0.0.0}:${HTTP_PORT:-80}:${HTTP_PORT:-80}"

Would need to check if something will break obv.

@aminvakil
Copy link
Contributor

Something like that then

- "${HTTPS_BIND:-:}:${HTTPS_PORT:-443}:${HTTPS_PORT:-443}"
- "${HTTP_BIND:-:}:${HTTP_PORT:-80}:${HTTP_PORT:-80}"
+ "${HTTPS_BIND:-0.0.0.0}:${HTTPS_PORT:-443}:${HTTPS_PORT:-443}"
+ "${HTTP_BIND:-0.0.0.0}:${HTTP_PORT:-80}:${HTTP_PORT:-80}"

Would need to check if something will break obv.

It didn't break for me and worked just fine.

@aminvakil
Copy link
Contributor

I'm not sure about these though:

# Checking old, wrong bindings
sed -i --follow-symlinks 's/HTTP_BIND=0.0.0.0/HTTP_BIND=/g' mailcow.conf
sed -i --follow-symlinks 's/HTTPS_BIND=0.0.0.0/HTTPS_BIND=/g' mailcow.conf

which has been added in
f3f6fb8 and I cannot realize what has been broken.

@aminvakil
Copy link
Contributor

Ah, I think something will break if 0.0.0.0 is used for IPv6... I'm not sure though.

@aminvakil
Copy link
Contributor

Seems like there is a problem:

mailcowdockerized-nginx-mailcow-1       "/docker-entrypoint.…"   nginx-mailcow       running             0.0.0.0:80->80/tcp, 0.0.0.0:443->443/tcp

while

mailcowdockerized-postfix-mailcow-1     "/docker-entrypoint.…"   postfix-mailcow     running             0.0.0.0:25->25/tcp, 0.0.0.0:465->465/tcp, 0.0.0.0:587->587/tcp, :::25->25/tcp, :::465->465/tcp, :::587->587/tcp

(note the missing :::80>80/tcp where postfix has :::25>25/tcp)
but I've tested and it works (I can curl its IPv6, so 🤷).

@Cerberus-ik
Copy link

Is there any update on v2 support? Considering v2.5.0 is bundled in the current docker ce/desktop install. Having to install v1 in parallel is a bit awkward.

@andryyy
Copy link
Contributor

andryyy commented May 30, 2022

I hope nobody saw you doing this. Must have been really awkward. :)

@aminvakil
Copy link
Contributor

aminvakil commented May 30, 2022

@Cerberus-ik I'm using docker-compose v2 and has no one problem with it expect IPv6 binding which has been fixed using this PR (#4531) as well.

I have tested and verified what I've done in the PR, but I don't know how test it using helper scripts as mentioned by @andryyy has said in the PR.

@Cerberus-ik
Copy link

@Cerberus-ik I'm using docker-compose v2 and has no one problem with it expect IPv6 binding which has been fixed using this PR (#4531) as well.

I have tested and verified what I've done in the PR, but I don't know how test it using helper scripts as mentioned by @andryyy has said in the PR.

So I either have to make the same changes as you or wait for it to get merged into the main branch?

@Cerberus-ik
Copy link

I hope nobody saw you doing this. Must have been really awkward. :)

Having to install deprecated eol "legacy" software for one application is awkward.

@hugalafutro
Copy link

hugalafutro commented May 30, 2022

Having to install deprecated eol "legacy" software for one application is awkward.

I concur, out of my 10+ physical/virtual machines, the one running mailcow is the only one where I have to maintain 2 versions of docker-compose (even if it's well documented and easy with compose-switch).

@Cerberus-ik
Copy link

I think this is especially a high priority problem because v1 will only get 4 more months of critical bug fixes and severe security updates. So every sane sysadmin will remove v1 before the end of the year.

@gsloop

This comment was marked as resolved.

@andryyy andryyy closed this as completed May 30, 2022
@mailcow mailcow locked as too heated and limited conversation to collaborators May 30, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests