[PATCH 1/4] docs: Hardcode username, password

Stephen Finucane stephen at that.guru
Sun Oct 7 08:45:03 AEDT 2018


This makes these commands more copy-pasteable.

Signed-off-by: Stephen Finucane <stephen at that.guru>
---
 docs/development/installation.rst | 14 +++++++++++---
 1 file changed, 11 insertions(+), 3 deletions(-)

diff --git a/docs/development/installation.rst b/docs/development/installation.rst
index 7f178818..6deea98d 100644
--- a/docs/development/installation.rst
+++ b/docs/development/installation.rst
@@ -82,8 +82,8 @@ backup the database at any stage, run:
 
 .. code-block:: shell
 
-   $ docker exec DATABASECONTAINER /usr/bin/mysqldump -u DATABASEUSER \
-       --password=DATABASEPASSWORD DATABASE > backup.sql
+   $ docker exec DATABASECONTAINER /usr/bin/mysqldump -u patchwork \
+       --password=password patchwork > backup.sql
 
 where ``DATABASECONTAINER`` is found by ``docker ps -a`` and the other settings
 are the same as those defined in ``patchwork/settings/dev.py``. To restore this
@@ -92,13 +92,21 @@ again, run:
 .. code-block:: shell
 
     $ docker-compose run --rm web python manage.py dbshell
-    mysql> use DATABASE;
+    mysql> use patchwork;
     mysql> set autocommit=0; source backup.sql; commit;
     mysql> exit;
 
 Any local edits to the project files made locally are immediately visible to
 the Docker container, and so should be picked up by the Django auto-reloader.
 
+.. note::
+
+   The ``patchwork`` username and ``password`` password are the defaults
+   defined in the provided ``dev`` settings files. If using something
+   different, export the ``PW_TEST_DB_USER`` and ``PW_TEST_DB_PASS`` variables
+   described in the :ref:`Environment Variables <dev-envvar>` section below and
+   use those environment options in the command above.
+
 For more information on Docker itself, please refer to the `docker`_ and
 `docker-compose`_ documentation.
 
-- 
2.17.1



More information about the Patchwork mailing list