Skip to content

Customizing Docker Compose Made Easy ๐Ÿš€ (Kustomize for Docker Compose)

License

Notifications You must be signed in to change notification settings

veerendra2/kompozit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

4 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Kompozit

Docker Pulls PyPI - Status PyPI - Version Release

โ„น Mostly likely you may want to use Use multiple Compose files in Docker Compose itself.

Declarative Configuration Management Tool for Docker Compose.

Like kustomize.io, but for Docker Compose.

kompozit logo

Features

Kompozit simplifies complex Docker Compose setups using declarative overlays, supporting:

Resources

But Why...? ๐Ÿค”

There are scenarios where you might need different Docker Compose configurations for the same application on different machines.

  • For example, I use slightly different configurations for the Traefik reverse proxy when managing my public WordPress site versus my home server. Instead of maintaining multiple, slightly different docker-compose.yml files for the same app, you can use kompozit to simplify and manage these variations efficiently.

Additionally, kompozit allows you to combine multiple docker-compose.yml files into a single stack.

  • For instance, you can keep a generic docker-compose.yml for PostgreSQL in a central location and customize it for different stacks in other locations as needed.

Installation ๐Ÿ’ป

PyPi

https://pypi.org/project/kompozit/

python -m pip install kompozit

kompozit --help
usage: kompozit [-h] [-b BUILD_PATH] [-o OUTPUT_DIR] [-v]

Declarative Configuration Management Tool for Docker Compose.

options:
  -h, --help            show this help message and exit
  -b, --build BUILD_PATH
                        Path to a directory containing 'komposition.yaml'. (default: .)
  -o, --output-dir OUTPUT_DIR
                        Directory to save the generated Docker Compose files. (default: None)
  -v, --version         Show kompozit version

Docker

https://hub.docker.com/r/veerendra2/kompozit

docker pull veerendra2/kompozit

Usage โš™๏ธ

git clone [email protected]:veerendra2/kompozit.git
cd kompozit
python -m pip install .

kompozit --build ./examples/overlay
...

# inside docker
docker pull kompozit:latest
docker run -it --rm -v ./examples:/examples kompozit:latest -b /examples/overlay

Local Development ๐Ÿ”ง

git clone [email protected]:veerendra2/kompozit.git
cd kompozit

python -m venv venv
source venv/bin/activate
pip install -e .