diff options
author | d11wtq <chris@w3style.co.uk> | 2014-06-08 23:05:54 +0000 |
---|---|---|
committer | Chris Corbyn <chris@w3style.co.uk> | 2014-06-09 01:31:50 +0000 |
commit | 74e067c6e62818438fee0c88fcbce65db5929d1d (patch) | |
tree | edd86c2f0def253cedec9939bf2fafa0aef96830 | |
parent | 85b96197999d26da42d74a3768ec02833a7e2946 (diff) |
Document --keep-old flag in CLI reference
Signed-off-by: Chris Corbyn <chris@w3style.co.uk>
-rw-r--r-- | docs/cli.md | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/docs/cli.md b/docs/cli.md index 9eb87f1f..3d5871ad 100644 --- a/docs/cli.md +++ b/docs/cli.md @@ -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/ |