Rename binary to docker-compose and config file to docker-compose.yml

Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
This commit is contained in:
Aanand Prasad 2015-01-20 11:27:10 +00:00
parent 2af7693e64
commit 620e29b63f
19 changed files with 35 additions and 35 deletions

2
.gitignore vendored
View File

@ -5,4 +5,4 @@
/dist
/docs/_site
/venv
compose.spec
docker-compose.spec

View File

@ -14,4 +14,4 @@ RUN python setup.py install
RUN chown -R user /code/
ENTRYPOINT ["/usr/local/bin/compose"]
ENTRYPOINT ["/usr/local/bin/docker-compose"]

View File

@ -110,13 +110,13 @@ class Command(DocoptCommand):
if file_path:
return os.path.join(self.base_dir, file_path)
if os.path.exists(os.path.join(self.base_dir, 'compose.yaml')):
log.warning("Fig just read the file 'compose.yaml' on startup, rather "
"than 'compose.yml'")
if os.path.exists(os.path.join(self.base_dir, 'docker-compose.yaml')):
log.warning("Fig just read the file 'docker-compose.yaml' on startup, rather "
"than 'docker-compose.yml'")
log.warning("Please be aware that .yml is the expected extension "
"in most cases, and using .yaml can cause compatibility "
"issues in future")
return os.path.join(self.base_dir, 'compose.yaml')
return os.path.join(self.base_dir, 'docker-compose.yaml')
return os.path.join(self.base_dir, 'compose.yml')
return os.path.join(self.base_dir, 'docker-compose.yml')

View File

@ -71,13 +71,13 @@ class TopLevelCommand(Command):
"""Fast, isolated development environments using Docker.
Usage:
compose [options] [COMMAND] [ARGS...]
compose -h|--help
docker-compose [options] [COMMAND] [ARGS...]
docker-compose -h|--help
Options:
--verbose Show more output
--version Print version and exit
-f, --file FILE Specify an alternate compose file (default: compose.yml)
-f, --file FILE Specify an alternate compose file (default: docker-compose.yml)
-p, --project-name NAME Specify an alternate project name (default: directory name)
Commands:
@ -99,7 +99,7 @@ class TopLevelCommand(Command):
"""
def docopt_options(self):
options = super(TopLevelCommand, self).docopt_options()
options['version'] = "compose %s" % __version__
options['version'] = "docker-compose %s" % __version__
return options
def build(self, project, options):
@ -261,11 +261,11 @@ class TopLevelCommand(Command):
For example:
$ compose run web python manage.py shell
$ docker-compose run web python manage.py shell
By default, linked services will be started, unless they are already
running. If you do not want to start linked services, use
`compose run --no-deps SERVICE COMMAND [ARGS...]`.
`docker-compose run --no-deps SERVICE COMMAND [ARGS...]`.
Usage: run [options] [-e KEY=VAL...] SERVICE [COMMAND] [ARGS...]
@ -280,7 +280,7 @@ class TopLevelCommand(Command):
--rm Remove container after run. Ignored in detached mode.
--service-ports Run command with the service's ports enabled and mapped
to the host.
-T Disable pseudo-tty allocation. By default `compose run`
-T Disable pseudo-tty allocation. By default `docker-compose run`
allocates a TTY.
"""
service = project.get_service(options['SERVICE'])
@ -352,7 +352,7 @@ class TopLevelCommand(Command):
Numbers are specified in the form `service=num` as arguments.
For example:
$ compose scale web=2 worker=3
$ docker-compose scale web=2 worker=3
Usage: scale [SERVICE=NUM...]
"""
@ -372,7 +372,7 @@ class TopLevelCommand(Command):
'Service "%s" cannot be scaled because it specifies a port '
'on the host. If multiple containers for this service were '
'created, the port would clash.\n\nRemove the ":" from the '
'port definition in compose.yml so Docker can choose a random '
'port definition in docker-compose.yml so Docker can choose a random '
'port for each container.' % service_name)
def start(self, project, options):
@ -387,7 +387,7 @@ class TopLevelCommand(Command):
"""
Stop running containers without removing them.
They can be started again with `compose start`.
They can be started again with `docker-compose start`.
Usage: stop [SERVICE...]
"""
@ -405,14 +405,14 @@ class TopLevelCommand(Command):
"""
Build, (re)create, start and attach to containers for a service.
By default, `compose up` will aggregate the output of each container, and
when it exits, all containers will be stopped. If you run `compose up -d`,
By default, `docker-compose up` will aggregate the output of each container, and
when it exits, all containers will be stopped. If you run `docker-compose up -d`,
it'll start the containers in the background and leave them running.
If there are existing containers for a service, `compose up` will stop
If there are existing containers for a service, `docker-compose up` will stop
and recreate them (preserving mounted volumes with volumes-from),
so that changes in `compose.yml` are picked up. If you do not want existing
containers to be recreated, `compose up --no-recreate` will re-use existing
so that changes in `docker-compose.yml` are picked up. If you do not want existing
containers to be recreated, `docker-compose up --no-recreate` will re-use existing
containers.
Usage: up [options] [SERVICE...]

View File

@ -1,5 +1,5 @@
#!/bin/bash
set -ex
pushd docs
compose run --rm jekyll jekyll build
docker-compose run --rm jekyll jekyll build
popd

View File

@ -2,7 +2,7 @@
set -ex
mkdir -p `pwd`/dist
chmod 777 `pwd`/dist
docker build -t compose .
docker run -u user -v `pwd`/dist:/code/dist --rm --entrypoint pyinstaller compose -F bin/compose
mv dist/compose dist/compose-Linux-x86_64
docker run -u user -v `pwd`/dist:/code/dist --rm --entrypoint dist/compose-Linux-x86_64 compose --version
docker build -t docker-compose .
docker run -u user -v `pwd`/dist:/code/dist --rm --entrypoint pyinstaller docker-compose -F bin/docker-compose
mv dist/docker-compose dist/docker-compose-Linux-x86_64
docker run -u user -v `pwd`/dist:/code/dist --rm --entrypoint dist/docker-compose-Linux-x86_64 docker-compose --version

View File

@ -5,6 +5,6 @@ virtualenv venv
venv/bin/pip install -r requirements.txt
venv/bin/pip install -r requirements-dev.txt
venv/bin/pip install .
venv/bin/pyinstaller -F bin/compose
mv dist/compose dist/compose-Darwin-x86_64
dist/compose-Darwin-x86_64 --version
venv/bin/pyinstaller -F bin/docker-compose
mv dist/docker-compose dist/docker-compose-Darwin-x86_64
dist/docker-compose-Darwin-x86_64 --version

View File

@ -1,5 +1,5 @@
#!/bin/sh
set -ex
docker build -t compose .
docker run -v /var/run/docker.sock:/var/run/docker.sock --rm --entrypoint flake8 compose compose
docker run -v /var/run/docker.sock:/var/run/docker.sock --rm --entrypoint nosetests compose $@
docker build -t docker-compose .
docker run -v /var/run/docker.sock:/var/run/docker.sock --rm --entrypoint flake8 docker-compose compose
docker run -v /var/run/docker.sock:/var/run/docker.sock --rm --entrypoint nosetests docker-compose $@

View File

@ -48,7 +48,7 @@ if sys.version_info < (2, 7):
setup(
name='compose',
name='docker-compose',
version=find_version("compose", "__init__.py"),
description='Multi-container orchestration for Docker',
url='https://www.docker.com/',
@ -61,6 +61,6 @@ setup(
tests_require=tests_require,
entry_points="""
[console_scripts]
compose=compose.cli.main:main
docker-compose=compose.cli.main:main
""",
)