Example configuration for AIO config: mailcow +caddy +borg +mailman #6288
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Contribution Guidelines
What does this PR include?
This contains an all-in-one example of using mailcow with Caddy as reverse proxy, Borg, for backups, and Mailman, for a list manager.
This override makes the following configuration changes:
If you choose to use this override, a user should also add these configuration directives in their
mailcow.conf
file:Short Description
A lot of this was mostly derived from existing guides. However, I found some a little out of date, and I didn't like some of the advise they were suggesting.
i.e. the Caddy example used a script and a cronjob to copy certs. Instead, I used caddy events to remove need for polling, the certificate is shared using shared volume mounts, and it uses a modified script from the acme folder to use the dockerapi endpoints to restart the dovecot/postfix containers.
The borg backup guide was ok, but I didn't like that it mounted the mysql sock. Just use the hostname instead. This was also modified to include the postgres database used by mailman. Additionally, it also bind-mounts the root mailcow-dockerized folder, so all config data is also backed-up.
The mailman guide was also ok, but it suggested to apache as a reverse proxy. I prefer Caddy, since it handles ACME/SSL automatically, and also does reverse-proxy very well. Additionally, this guide suggested to install apache not as a container, but as app installed directly on the host - would prefer to use a container solution instead. It also suggested to install mailman, using their own dockerfiles, and creating an external network to allow the two docker-compose stacks to communicate with each other. Instead, I added all of the mailman docker compose configuration files directly to the override - you do not need to download/clone mailman from git either. The example docker-compose includes everything.
Additionally, I needed to custom build mailman's dockerfiles for aarch64 support, since I'm using Heztner cloud's arm servers.
TODOs:
Affected Containers
This does add anything to any existing containers. These are new instructions/examples for users to follow if they wanted to configure an all-in-one server with mailcow, borg, and mailman.
Did you run tests?
Deployed to my production instance.
What did you tested?
What were the final results? (Awaited, got)