From c9b4d1f16ef6a1797a4e521aec3b5ab92d0e6075 Mon Sep 17 00:00:00 2001 From: Audrey Roy Greenfeld Date: Sat, 3 Oct 2015 16:44:43 -0700 Subject: [PATCH] Unify docker-compose run sections. --- docs/developing-locally-docker.rst | 24 +++++++++--------------- 1 file changed, 9 insertions(+), 15 deletions(-) diff --git a/docs/developing-locally-docker.rst b/docs/developing-locally-docker.rst index 809a796d..fa3e670c 100644 --- a/docs/developing-locally-docker.rst +++ b/docs/developing-locally-docker.rst @@ -69,23 +69,10 @@ Build the Stack --------------- This can take a while, especially the first time you run this particular command -on your development system. - -:: +on your development system:: $ docker-compose build -Running bash commands (i.e. management commands) ----------------------------------------------------- - -This is done using the ``docker-compose run`` command. In the following examples -we specify the ``django`` container as the location to run our management commands. - -Example: - - $ docker-compose run django python manage.py migrate - $ docker-compose run django python manage.py createsuperuser - Boot the System --------------- @@ -105,13 +92,20 @@ You can also set the environment variable ``COMPOSE_FILE`` pointing to ``dev.yml And then run:: $ docker-compose up + +Running management commands +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +As with any shell command that we wish to run in our container, this is done +using the ``docker-compose run`` command. To migrate your app and to create a superuser, run:: $ docker-compose run django python manage.py migrate - $ docker-compose run django python manage.py createsuperuser +Here we specify the ``django`` container as the location to run our management commands. + Production Mode ~~~~~~~~~~~~~~~~