From 620e29b63ffd6a8b609c24a176889532673137d0 Mon Sep 17 00:00:00 2001 From: Aanand Prasad Date: Tue, 20 Jan 2015 11:27:10 +0000 Subject: [PATCH] Rename binary to docker-compose and config file to docker-compose.yml Signed-off-by: Aanand Prasad --- .gitignore | 2 +- Dockerfile | 2 +- bin/{compose => docker-compose} | 0 compose/cli/command.py | 10 +++---- compose/cli/main.py | 30 +++++++++---------- script/build-docs | 2 +- script/build-linux | 8 ++--- script/build-osx | 6 ++-- script/test | 6 ++-- setup.py | 4 +-- .../{compose.yml => docker-compose.yml} | 0 .../{compose.yml => docker-compose.yml} | 0 .../{compose.yml => docker-compose.yml} | 0 .../{compose.yml => docker-compose.yml} | 0 .../{compose.yaml => docker-compose.yaml} | 0 .../{compose.yml => docker-compose.yml} | 0 .../{compose.yml => docker-compose.yml} | 0 .../{compose.yml => docker-compose.yml} | 0 .../{compose.yml => docker-compose.yml} | 0 19 files changed, 35 insertions(+), 35 deletions(-) rename bin/{compose => docker-compose} (100%) rename tests/fixtures/commands-composefile/{compose.yml => docker-compose.yml} (100%) rename tests/fixtures/dockerfile_with_entrypoint/{compose.yml => docker-compose.yml} (100%) rename tests/fixtures/environment-composefile/{compose.yml => docker-compose.yml} (100%) rename tests/fixtures/links-composefile/{compose.yml => docker-compose.yml} (100%) rename tests/fixtures/longer-filename-composefile/{compose.yaml => docker-compose.yaml} (100%) rename tests/fixtures/multiple-composefiles/{compose.yml => docker-compose.yml} (100%) rename tests/fixtures/ports-composefile/{compose.yml => docker-compose.yml} (100%) rename tests/fixtures/simple-composefile/{compose.yml => docker-compose.yml} (100%) rename tests/fixtures/simple-dockerfile/{compose.yml => docker-compose.yml} (100%) diff --git a/.gitignore b/.gitignore index 83533dd7f..da7fe7fa4 100644 --- a/.gitignore +++ b/.gitignore @@ -5,4 +5,4 @@ /dist /docs/_site /venv -compose.spec +docker-compose.spec diff --git a/Dockerfile b/Dockerfile index 85313b302..ee9fb4a2f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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"] diff --git a/bin/compose b/bin/docker-compose similarity index 100% rename from bin/compose rename to bin/docker-compose diff --git a/compose/cli/command.py b/compose/cli/command.py index 45b124a19..dc7683a35 100644 --- a/compose/cli/command.py +++ b/compose/cli/command.py @@ -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') diff --git a/compose/cli/main.py b/compose/cli/main.py index 391916244..cfe29cd07 100644 --- a/compose/cli/main.py +++ b/compose/cli/main.py @@ -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...] diff --git a/script/build-docs b/script/build-docs index edcc52380..57dc82a27 100755 --- a/script/build-docs +++ b/script/build-docs @@ -1,5 +1,5 @@ #!/bin/bash set -ex pushd docs -compose run --rm jekyll jekyll build +docker-compose run --rm jekyll jekyll build popd diff --git a/script/build-linux b/script/build-linux index aa69fa7b7..07c9d7ec6 100755 --- a/script/build-linux +++ b/script/build-linux @@ -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 diff --git a/script/build-osx b/script/build-osx index 9b239caf2..26309744a 100755 --- a/script/build-osx +++ b/script/build-osx @@ -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 diff --git a/script/test b/script/test index b7e7245da..fef16b807 100755 --- a/script/test +++ b/script/test @@ -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 $@ diff --git a/setup.py b/setup.py index 7c21c53d7..68c11bd91 100644 --- a/setup.py +++ b/setup.py @@ -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 """, ) diff --git a/tests/fixtures/commands-composefile/compose.yml b/tests/fixtures/commands-composefile/docker-compose.yml similarity index 100% rename from tests/fixtures/commands-composefile/compose.yml rename to tests/fixtures/commands-composefile/docker-compose.yml diff --git a/tests/fixtures/dockerfile_with_entrypoint/compose.yml b/tests/fixtures/dockerfile_with_entrypoint/docker-compose.yml similarity index 100% rename from tests/fixtures/dockerfile_with_entrypoint/compose.yml rename to tests/fixtures/dockerfile_with_entrypoint/docker-compose.yml diff --git a/tests/fixtures/environment-composefile/compose.yml b/tests/fixtures/environment-composefile/docker-compose.yml similarity index 100% rename from tests/fixtures/environment-composefile/compose.yml rename to tests/fixtures/environment-composefile/docker-compose.yml diff --git a/tests/fixtures/links-composefile/compose.yml b/tests/fixtures/links-composefile/docker-compose.yml similarity index 100% rename from tests/fixtures/links-composefile/compose.yml rename to tests/fixtures/links-composefile/docker-compose.yml diff --git a/tests/fixtures/longer-filename-composefile/compose.yaml b/tests/fixtures/longer-filename-composefile/docker-compose.yaml similarity index 100% rename from tests/fixtures/longer-filename-composefile/compose.yaml rename to tests/fixtures/longer-filename-composefile/docker-compose.yaml diff --git a/tests/fixtures/multiple-composefiles/compose.yml b/tests/fixtures/multiple-composefiles/docker-compose.yml similarity index 100% rename from tests/fixtures/multiple-composefiles/compose.yml rename to tests/fixtures/multiple-composefiles/docker-compose.yml diff --git a/tests/fixtures/ports-composefile/compose.yml b/tests/fixtures/ports-composefile/docker-compose.yml similarity index 100% rename from tests/fixtures/ports-composefile/compose.yml rename to tests/fixtures/ports-composefile/docker-compose.yml diff --git a/tests/fixtures/simple-composefile/compose.yml b/tests/fixtures/simple-composefile/docker-compose.yml similarity index 100% rename from tests/fixtures/simple-composefile/compose.yml rename to tests/fixtures/simple-composefile/docker-compose.yml diff --git a/tests/fixtures/simple-dockerfile/compose.yml b/tests/fixtures/simple-dockerfile/docker-compose.yml similarity index 100% rename from tests/fixtures/simple-dockerfile/compose.yml rename to tests/fixtures/simple-dockerfile/docker-compose.yml