Kompozit is a tool inspired by . While Kustomize simplifies Kubernetes configurations, Kompozit does the same for docker-compose. It enables you to customize and patch docker-compose.yaml files efficiently, reducing redundancy and improving maintainability.
Why Kompozit? π€
Managing multiple docker-compose configurations can be cumbersome. For instance:
β’ You have a docker-compose-traefik.yaml for a Traefik reverse proxy.
β’ You need different setups for:
A simple home server (docker-compose-traefik-simple.yaml).
A public website with additional security (docker-compose-traefik-secured.yaml).
These configurations share most content, but a few details differ. This leads to duplication and makes updates tedious. π΅βπ«
Enter Kompozit! π
Kompozit lets you:
1. π Store your base configurations in a reusable βbaseβ folder.
2. βοΈ Define overlays for different setups (e.g., βhome serverβ or βpublic websiteβ).
3. π Apply patches to the base configuration without modifying it directly.
Example Use Case π‘
Base Configuration ποΈ
Start with a base folder containing your generic docker-compose setup.
$ tree base/
base/
βββ docker-compose-traefik.yml
βββ kompozition.yml
β’ docker-compose-traefik.yml: The base Traefik configuration. π³οΈ
β’ kompozition.yml: Declares resources for Kompozit to process. π