A fabric-like tool built on Click, that simply runs a playfile.py.
pip install git+ssh://git@github.com/rubot/play.git@master#egg=play
With play templates: templates.md
Usage: play [OPTIONS] COMMAND [ARGS]...
Deployment and Provisioning wrapper.
Options:
-C, --compose Use docker-compose if provided by subcommand
and a compose-file is in place.
-v, --verbose Verbosity
-l, --list-commands List commands
-ll, --list-templates List templates
-f, --playfile TEXT Which file to run [default: playfile.py]
-t, --use-template [vagrant|hello]
Use a playfile-template directly
--init [playfile-vagrant|vagrant-simple|playfile-hello|vagrant-complex]
Copy template into current directory.
--version Show the version and exit.
--help Show this message and exit.
The subcommand defined in the playfile must import and use play.compose
.
Now, if the -C
switch is given, the commandline is given to docker-compose run --rm
Default docker-compose filename: play-compose.yml
Can be overriden directly in the playfile with os.environ['PLAY_COMPOSE_FILE'] = 'path/to/docker-compose.yml'
PLAYFILE
PLAYTEMPLATE
PLAY_COMPOSE_FILE