Compote
Compote is a wrapper for docker-compose. It extends compose in two ways.
Firstly, it adds additional fields in the config spec, main focus of those additions is to provide more flexibility with extending of services definitions.
Second, it adds abitility to specify custom commands as node's package.json "scripts" field do.
Installation
$ gem install compote
Usage
You use compote
as you do docker-compose
as all commands are redirected to it.
Compote will search for docker-compote.yml
file in current directory. You also can specify a path to a compote's config with env variable COMPOTE_FILE
.
Here are additions that compote brings.
version: '2.1'
compote:
extends:
../hello.yml: { only: [ 'volumes' ] }
env_file: .hello_env
environment:
COMPOSE_PROJECT_NAME: hello
commands:
hello: echo "hello"
services:
hello:
image: hello
compote:
extends:
- ../hello.yml:hello
- ../hello.yml:world
volumes: {}
networks: {}
commands:
world: --rm bash
TODO
- Tests with aruba.
- Interpolation of env variables in compote fields.
- Suggestions for misspelled commands.
- Add some power to
only
and except
extend options for specifying nested paths.
Contributing
Bug reports and pull requests are welcome on GitHub at https://github.com/vonagam/compote.
License
The gem is available as open source under the terms of the MIT License.