docker-compose-hosts
Work with docker-compose manifests for multiple hosts.
Contents
Get it
go get
Using go get -u github.com/keilerkonzept/docker-compose-hosts
Pre-built binary
Download a binary from the releases page or from the shell:
# Linux
curl -L https://github.com/keilerkonzept/docker-compose-hosts/releases/download/0.1.2/docker-compose-hosts_0.1.2_linux_x86_64.tar.gz | tar xz
# OS X
curl -L https://github.com/keilerkonzept/docker-compose-hosts/releases/download/0.1.2/docker-compose-hosts_0.1.2_osx_x86_64.tar.gz | tar xz
# Windows
curl -LO https://github.com/keilerkonzept/docker-compose-hosts/releases/download/0.1.2/docker-compose-hosts_0.1.2_windows_x86_64.zip
unzip docker-compose-hosts_0.1.2_windows_x86_64.zip
Usage
docker-compose-hosts
reads project definitions from a docker-compose-hosts.yml
file, and forwards all positional arguments to docker-compose
for each of the projects.
Command-line interface syntax
docker-compose-hosts [OPTIONS] -- [COMMAND [ARGS...]]
Usage of docker-compose-hosts:
-f string
(alias for -file) (default "docker-compose-hosts.yml")
-file string
specify an alternate compose-hosts file (default "docker-compose-hosts.yml")
-logs-off
disable all logging
-logs-verbose
enable extra logging
-parallel
run commands in parallel
-q (alias for -logs-off)
-v (alias for -logs-verbose)
-version
print version and exit
docker-compose-hosts.yml
syntax
Example file with all fields below; see also example/docker-compose-hosts.yml.
version: '1.0'
projects:
project-name-goes-here:
compose_file: (path to docker-compose.yml)
docker_host: (value for DOCKER_HOST, optional)
another-project-name-goes-here:
compose_file: (path to docker-compose.yml)
docker_host: (value for DOCKER_HOST, optional)
All string fields except version
support $ENVVARS
; A literal $
can be produced using the escape $$
.