Document --keep-old flag in CLI reference

Signed-off-by: Chris Corbyn <chris@w3style.co.uk>
This commit is contained in:
d11wtq 2014-06-08 23:05:54 +00:00 committed by Chris Corbyn
parent 85b9619799
commit 74e067c6e6
1 changed files with 8 additions and 2 deletions

View File

@ -45,7 +45,7 @@ For example:
$ fig run web python manage.py shell
Note that this will not start any services that the command's service links to. So if, for example, your one-off command talks to your database, you will need to run `fig up -d db` first.
By default, linked services will be started, unless they are already running.
One-off commands are started in new containers with the same config as a normal container for that service, so volumes, links, etc will all be created as expected. The only thing different to a normal container is the command will be overridden with the one specified and no ports will be created in case they collide.
@ -53,6 +53,10 @@ Links are also created between one-off commands and the other containers for tha
$ fig run db /bin/sh -c "psql -h \$DB_1_PORT_5432_TCP_ADDR -U docker"
If you do not want linked containers to be started when running the one-off command, specify the `--no-links` flag:
$ fig run --no-links web python manage.py shell
## scale
Set number of containers to run for a service.
@ -74,8 +78,10 @@ Stop running containers without removing them. They can be started again with `f
Build, (re)create, start and attach to containers for a service.
Linked services will be started, unless they are already running.
By default, `fig up` will aggregate the output of each container, and when it exits, all containers will be stopped. If you run `fig up -d`, it'll start the containers in the background and leave them running.
If there are existing containers for a service, `fig up` will stop and recreate them (preserving mounted volumes with [volumes-from]), so that changes in `fig.yml` are picked up.
By default if there are existing containers for a service, `fig up` will stop and recreate them (preserving mounted volumes with [volumes-from]), so that changes in `fig.yml` are picked up. If you do no want containers to be stopped and recreated, use `fig up --keep-old`. This will still start any stopped containers, if needed.
[volumes-from]: http://docs.docker.io/en/latest/use/working_with_volumes/