Spike: Add --up option to `fig run`

Signed-off-by: Chris Corbyn <chris@w3style.co.uk>
This commit is contained in:
d11wtq 2014-06-07 08:22:54 +00:00 committed by Chris Corbyn
parent 8b4ed0c1a8
commit edf6b56016
1 changed files with 10 additions and 3 deletions

View File

@ -202,9 +202,10 @@ class TopLevelCommand(Command):
$ fig run web python manage.py shell $ fig run web python manage.py shell
Note that this will not start any services that the command's service Note that by default this will not start any services that the
links to. So if, for example, your one-off command talks to your command's service links to. So if, for example, your one-off command
database, you will need to run `fig up -d db` first. talks to your database, you will need to either run `fig up -d db`
first, or use `fig run --up SERVICE COMMAND [ARGS...]`.
Usage: run [options] SERVICE COMMAND [ARGS...] Usage: run [options] SERVICE COMMAND [ARGS...]
@ -214,7 +215,13 @@ class TopLevelCommand(Command):
-T Disable pseudo-tty allocation. By default `fig run` -T Disable pseudo-tty allocation. By default `fig run`
allocates a TTY. allocates a TTY.
--rm Remove container after run. Ignored in detached mode. --rm Remove container after run. Ignored in detached mode.
--up Also start services that the command's service links to
""" """
if options['--up']:
# FIXME: I'm not sure if this is good python form
self.up({'-d': True, 'SERVICE': None})
service = self.project.get_service(options['SERVICE']) service = self.project.get_service(options['SERVICE'])
tty = True tty = True