From f43783e1bfbca5e928da10de19f938a69a762ecb Mon Sep 17 00:00:00 2001 From: Aanand Prasad Date: Fri, 11 Jul 2014 14:34:08 -0700 Subject: [PATCH] update --- cli.html | 11 ++++++++--- django.html | 2 +- env.html | 2 +- index.html | 6 +++--- install.html | 6 +++--- rails.html | 2 +- wordpress.html | 2 +- yml.html | 15 +++++++++++++-- 8 files changed, 31 insertions(+), 15 deletions(-) diff --git a/cli.html b/cli.html index a0ab1e33..a9218503 100644 --- a/cli.html +++ b/cli.html @@ -6,7 +6,7 @@ - +
@@ -56,13 +56,16 @@

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.

Links are also created between one-off commands and the other containers for that service so you can do stuff like this:

$ 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-deps flag:

+
$ fig run --no-deps web python manage.py shell
+

scale

Set number of containers to run for a service.

@@ -83,9 +86,11 @@ For example:

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 --no-recreate. This will still start any stopped containers, if needed.