docs: Add minimal compose.yaml examples that demonstrate specific features#4138
docs: Add minimal compose.yaml examples that demonstrate specific features#4138casperklein merged 13 commits intomasterfrom
compose.yaml examples that demonstrate specific features#4138Conversation
There was a problem hiding this comment.
May want to decide on being consistent with the registry? ghcr.io/docker-mailserver/docker-mailserver / mailserver/docker-mailserver (implicit docker.io/ prefix)
Otherwise this is great, thanks for taking the time to follow-up so quickly with the discussion to make these easier to discover! 🎉
I've left a feedback comment for any future maintainers that might land here, should the examples grow or test suite migrate to compose 👍
| configs: | ||
| - source: dms-accounts-fetch | ||
| target: /tmp/docker-mailserver/postfix-accounts.cf | ||
| - source: fetchmail | ||
| target: /tmp/docker-mailserver/fetchmail.cf |
There was a problem hiding this comment.
For reference, if anyone does expand on this in future IIRC, the following info might be worth being aware of.
It's possible to split these out to separate compose.yaml files and use the Docker Compose feature include or the merge/override feature to share common configs.
Notably, you will have trouble merging YAML lists/sequences, which I think is only supported by multiple -f overrides (requires the same service name), whereas for YAML maps you can use Fragments / Extensions (YAML anchors/aliases + YAML merge << syntax).
- That can make
environmentmore suited to map style instead of list, since that supports both forms. - One notable difference over
volumeswithconfigsis that a bind mount volume will persist changes to disk whereas theconfigsapproach here is useful for immutable init state when creating the container, but it can be modified after at runtime.- Re-creating the container will start with the initial config in
compose.yamlagain. This is the main value besides self-containing the example into a single file. - It might be possible to get the same with
volumesif some of the volume driver has a setting to emulate one-way sync (:ro/ read-only does but it prevents writes in the container)..
- Re-creating the container will start with the initial config in
If there are separate YAML snippets to be composed, you just run docker compose config instead of the equivalent docker compose up to output the full compose.yaml. If examples grow it may be useful to know about that :)
compose.yaml examples that demonstrate specific features
Co-authored-by: Brennan Kinney <[email protected]>
Co-authored-by: Brennan Kinney <[email protected]>
Co-authored-by: Brennan Kinney <[email protected]>
Co-authored-by: Brennan Kinney <[email protected]>
Co-authored-by: Brennan Kinney <[email protected]>
Co-authored-by: Brennan Kinney <[email protected]>
Co-authored-by: Brennan Kinney <[email protected]>
Co-authored-by: Brennan Kinney <[email protected]>
georglauterbach
left a comment
There was a problem hiding this comment.
LGTM 👍🏼 Nice addition 🚀
Description
NOTE: This PR description below was added by @polarathene
Add some of the self-contained
compose.yamlexamples that @polarathene has provided in past issues to support troubleshooting and demonstrate a feature working completely locally.These are not intended to mirror production deployments, they sometimes take a different approach not suited for real deployments to better support quick setup
swaksas the mail client within a container and staying within the same docker network, rather than interacting with a host mail client. Hence the original issue context for related CLI commands/information.Our users often aren't aware that they can run DMS like this as easily. They can use multiple instances of DMS to learn how features work or troubleshoot without needing to worry about external third-party services, LetsEncrypt + real domain DNS and VPS, etc.
Reference: #4136 (comment)
Type of change
Checklist
CHANGELOG.md