mirror of
				https://github.com/docker/compose.git
				synced 2025-10-31 19:24:21 +01:00 
			
		
		
		
	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:
		
							parent
							
								
									2af7693e64
								
							
						
					
					
						commit
						620e29b63f
					
				
							
								
								
									
										2
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							| @ -5,4 +5,4 @@ | |||||||
| /dist | /dist | ||||||
| /docs/_site | /docs/_site | ||||||
| /venv | /venv | ||||||
| compose.spec | docker-compose.spec | ||||||
|  | |||||||
| @ -14,4 +14,4 @@ RUN python setup.py install | |||||||
| 
 | 
 | ||||||
| RUN chown -R user /code/ | RUN chown -R user /code/ | ||||||
| 
 | 
 | ||||||
| ENTRYPOINT ["/usr/local/bin/compose"] | ENTRYPOINT ["/usr/local/bin/docker-compose"] | ||||||
|  | |||||||
| @ -110,13 +110,13 @@ class Command(DocoptCommand): | |||||||
|         if file_path: |         if file_path: | ||||||
|             return os.path.join(self.base_dir, file_path) |             return os.path.join(self.base_dir, file_path) | ||||||
| 
 | 
 | ||||||
|         if os.path.exists(os.path.join(self.base_dir, 'compose.yaml')): |         if os.path.exists(os.path.join(self.base_dir, 'docker-compose.yaml')): | ||||||
|             log.warning("Fig just read the file 'compose.yaml' on startup, rather " |             log.warning("Fig just read the file 'docker-compose.yaml' on startup, rather " | ||||||
|                         "than 'compose.yml'") |                         "than 'docker-compose.yml'") | ||||||
|             log.warning("Please be aware that .yml is the expected extension " |             log.warning("Please be aware that .yml is the expected extension " | ||||||
|                         "in most cases, and using .yaml can cause compatibility " |                         "in most cases, and using .yaml can cause compatibility " | ||||||
|                         "issues in future") |                         "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') | ||||||
|  | |||||||
| @ -71,13 +71,13 @@ class TopLevelCommand(Command): | |||||||
|     """Fast, isolated development environments using Docker. |     """Fast, isolated development environments using Docker. | ||||||
| 
 | 
 | ||||||
|     Usage: |     Usage: | ||||||
|       compose [options] [COMMAND] [ARGS...] |       docker-compose [options] [COMMAND] [ARGS...] | ||||||
|       compose -h|--help |       docker-compose -h|--help | ||||||
| 
 | 
 | ||||||
|     Options: |     Options: | ||||||
|       --verbose                 Show more output |       --verbose                 Show more output | ||||||
|       --version                 Print version and exit |       --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) |       -p, --project-name NAME   Specify an alternate project name (default: directory name) | ||||||
| 
 | 
 | ||||||
|     Commands: |     Commands: | ||||||
| @ -99,7 +99,7 @@ class TopLevelCommand(Command): | |||||||
|     """ |     """ | ||||||
|     def docopt_options(self): |     def docopt_options(self): | ||||||
|         options = super(TopLevelCommand, self).docopt_options() |         options = super(TopLevelCommand, self).docopt_options() | ||||||
|         options['version'] = "compose %s" % __version__ |         options['version'] = "docker-compose %s" % __version__ | ||||||
|         return options |         return options | ||||||
| 
 | 
 | ||||||
|     def build(self, project, options): |     def build(self, project, options): | ||||||
| @ -261,11 +261,11 @@ class TopLevelCommand(Command): | |||||||
| 
 | 
 | ||||||
|         For example: |         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 |         By default, linked services will be started, unless they are already | ||||||
|         running. If you do not want to start linked services, use |         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...] |         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. |             --rm                  Remove container after run. Ignored in detached mode. | ||||||
|             --service-ports       Run command with the service's ports enabled and mapped |             --service-ports       Run command with the service's ports enabled and mapped | ||||||
|                                   to the host. |                                   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. |                                   allocates a TTY. | ||||||
|         """ |         """ | ||||||
|         service = project.get_service(options['SERVICE']) |         service = project.get_service(options['SERVICE']) | ||||||
| @ -352,7 +352,7 @@ class TopLevelCommand(Command): | |||||||
|         Numbers are specified in the form `service=num` as arguments. |         Numbers are specified in the form `service=num` as arguments. | ||||||
|         For example: |         For example: | ||||||
| 
 | 
 | ||||||
|             $ compose scale web=2 worker=3 |             $ docker-compose scale web=2 worker=3 | ||||||
| 
 | 
 | ||||||
|         Usage: scale [SERVICE=NUM...] |         Usage: scale [SERVICE=NUM...] | ||||||
|         """ |         """ | ||||||
| @ -372,7 +372,7 @@ class TopLevelCommand(Command): | |||||||
|                     'Service "%s" cannot be scaled because it specifies a port ' |                     'Service "%s" cannot be scaled because it specifies a port ' | ||||||
|                     'on the host. If multiple containers for this service were ' |                     'on the host. If multiple containers for this service were ' | ||||||
|                     'created, the port would clash.\n\nRemove the ":" from the ' |                     '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) |                     'port for each container.' % service_name) | ||||||
| 
 | 
 | ||||||
|     def start(self, project, options): |     def start(self, project, options): | ||||||
| @ -387,7 +387,7 @@ class TopLevelCommand(Command): | |||||||
|         """ |         """ | ||||||
|         Stop running containers without removing them. |         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...] |         Usage: stop [SERVICE...] | ||||||
|         """ |         """ | ||||||
| @ -405,14 +405,14 @@ class TopLevelCommand(Command): | |||||||
|         """ |         """ | ||||||
|         Build, (re)create, start and attach to containers for a service. |         Build, (re)create, start and attach to containers for a service. | ||||||
| 
 | 
 | ||||||
|         By default, `compose up` will aggregate the output of each container, and |         By default, `docker-compose up` will aggregate the output of each container, and | ||||||
|         when it exits, all containers will be stopped. If you run `compose up -d`, |         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. |         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), |         and recreate them (preserving mounted volumes with volumes-from), | ||||||
|         so that changes in `compose.yml` are picked up. If you do not want existing |         so that changes in `docker-compose.yml` are picked up. If you do not want existing | ||||||
|         containers to be recreated, `compose up --no-recreate` will re-use existing |         containers to be recreated, `docker-compose up --no-recreate` will re-use existing | ||||||
|         containers. |         containers. | ||||||
| 
 | 
 | ||||||
|         Usage: up [options] [SERVICE...] |         Usage: up [options] [SERVICE...] | ||||||
|  | |||||||
| @ -1,5 +1,5 @@ | |||||||
| #!/bin/bash | #!/bin/bash | ||||||
| set -ex | set -ex | ||||||
| pushd docs | pushd docs | ||||||
| compose run --rm jekyll jekyll build | docker-compose run --rm jekyll jekyll build | ||||||
| popd | popd | ||||||
|  | |||||||
| @ -2,7 +2,7 @@ | |||||||
| set -ex | set -ex | ||||||
| mkdir -p `pwd`/dist | mkdir -p `pwd`/dist | ||||||
| chmod 777 `pwd`/dist | chmod 777 `pwd`/dist | ||||||
| docker build -t compose . | docker build -t docker-compose . | ||||||
| docker run -u user -v `pwd`/dist:/code/dist --rm --entrypoint pyinstaller compose -F bin/compose | docker run -u user -v `pwd`/dist:/code/dist --rm --entrypoint pyinstaller docker-compose -F bin/docker-compose | ||||||
| mv dist/compose dist/compose-Linux-x86_64 | mv dist/docker-compose dist/docker-compose-Linux-x86_64 | ||||||
| docker run -u user -v `pwd`/dist:/code/dist --rm --entrypoint dist/compose-Linux-x86_64 compose --version | docker run -u user -v `pwd`/dist:/code/dist --rm --entrypoint dist/docker-compose-Linux-x86_64 docker-compose --version | ||||||
|  | |||||||
| @ -5,6 +5,6 @@ virtualenv venv | |||||||
| venv/bin/pip install -r requirements.txt | venv/bin/pip install -r requirements.txt | ||||||
| venv/bin/pip install -r requirements-dev.txt | venv/bin/pip install -r requirements-dev.txt | ||||||
| venv/bin/pip install . | venv/bin/pip install . | ||||||
| venv/bin/pyinstaller -F bin/compose | venv/bin/pyinstaller -F bin/docker-compose | ||||||
| mv dist/compose dist/compose-Darwin-x86_64 | mv dist/docker-compose dist/docker-compose-Darwin-x86_64 | ||||||
| dist/compose-Darwin-x86_64 --version | dist/docker-compose-Darwin-x86_64 --version | ||||||
|  | |||||||
| @ -1,5 +1,5 @@ | |||||||
| #!/bin/sh | #!/bin/sh | ||||||
| set -ex | set -ex | ||||||
| docker build -t compose . | docker build -t docker-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 flake8 docker-compose compose | ||||||
| docker run -v /var/run/docker.sock:/var/run/docker.sock --rm --entrypoint nosetests compose $@ | docker run -v /var/run/docker.sock:/var/run/docker.sock --rm --entrypoint nosetests docker-compose $@ | ||||||
|  | |||||||
							
								
								
									
										4
									
								
								setup.py
									
									
									
									
									
								
							
							
						
						
									
										4
									
								
								setup.py
									
									
									
									
									
								
							| @ -48,7 +48,7 @@ if sys.version_info < (2, 7): | |||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| setup( | setup( | ||||||
|     name='compose', |     name='docker-compose', | ||||||
|     version=find_version("compose", "__init__.py"), |     version=find_version("compose", "__init__.py"), | ||||||
|     description='Multi-container orchestration for Docker', |     description='Multi-container orchestration for Docker', | ||||||
|     url='https://www.docker.com/', |     url='https://www.docker.com/', | ||||||
| @ -61,6 +61,6 @@ setup( | |||||||
|     tests_require=tests_require, |     tests_require=tests_require, | ||||||
|     entry_points=""" |     entry_points=""" | ||||||
|     [console_scripts] |     [console_scripts] | ||||||
|     compose=compose.cli.main:main |     docker-compose=compose.cli.main:main | ||||||
|     """, |     """, | ||||||
| ) | ) | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user