Unify docker-compose run sections.

This commit is contained in:
Audrey Roy Greenfeld 2015-10-03 16:44:43 -07:00
parent 765bb32fbe
commit c9b4d1f16e

View File

@ -69,23 +69,10 @@ Build the Stack
--------------- ---------------
This can take a while, especially the first time you run this particular command 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 $ 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 Boot the System
--------------- ---------------
@ -106,12 +93,19 @@ And then run::
$ docker-compose up $ 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:: 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 migrate
$ docker-compose run django python manage.py createsuperuser $ docker-compose run django python manage.py createsuperuser
Here we specify the ``django`` container as the location to run our management commands.
Production Mode Production Mode
~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~