From patchwork Sat Oct 6 21:45:03 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Finucane X-Patchwork-Id: 980007 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [203.11.71.2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 42SKvY70zfz9s8T for ; Sun, 7 Oct 2018 08:46:33 +1100 (AEDT) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=that.guru Authentication-Results: ozlabs.org; dkim=fail reason="key not found in DNS" (0-bit key; unprotected) header.d=that.guru header.i=@that.guru header.b="KpQVdcoQ"; dkim-atps=neutral Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 42SKvY5QqNzF3M7 for ; Sun, 7 Oct 2018 08:46:33 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=that.guru Authentication-Results: lists.ozlabs.org; dkim=fail reason="key not found in DNS" (0-bit key; unprotected) header.d=that.guru header.i=@that.guru header.b="KpQVdcoQ"; dkim-atps=neutral X-Original-To: patchwork@lists.ozlabs.org Delivered-To: patchwork@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; spf=none (mailfrom) smtp.mailfrom=that.guru (client-ip=185.234.75.3; helo=relay-direct21.mxroute.com; envelope-from=stephen@that.guru; receiver=) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=that.guru Authentication-Results: lists.ozlabs.org; dkim=fail reason="key not found in DNS" (0-bit key; unprotected) header.d=that.guru header.i=@that.guru header.b="KpQVdcoQ"; dkim-atps=neutral Received: from relay-direct21.mxroute.com (relay-direct21.mxroute.com [185.234.75.3]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 42SKtd4xvrzF3KR for ; Sun, 7 Oct 2018 08:45:45 +1100 (AEDT) Received: from filter002.mxroute.com (unknown [185.133.192.179]) by relay-direct21.mxroute.com (Postfix) with ESMTP id ADD6A3F351 for ; Sat, 6 Oct 2018 21:45:11 +0000 (UTC) Received: from one.mxroute.com (one.mxroute.com [195.201.59.211]) by filter002.mxroute.com (Postfix) with ESMTPS id 8E8363F0F2 for ; Sat, 6 Oct 2018 21:45:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=that.guru; s=default; h=References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From: Sender:Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=jSE0Y9Oi+NDQU8UtmkucuLua7HxNnmJ175rW8444NSU=; b=KpQVdcoQ5nPJuJSe0kcgTjExSY Bj5e6i9I+X2cTfPf7W0oDC4yuVE3K7+np7HZBvpLaWc3txAgHYhVu/sZPHtlkUW5HnLwtK+4ik1aW j+Ab9M2GK88ijbj2S4IqtVhubyq6I2M2zw45c/6t5VQpe3MMhw3nbh5SVVY83MpoAEkTouzsHmaeW NQJQTGrHRDoJizexEipxtGand7HpU/Dd/T6HpM33Roknlbn1NeTFUEkLzjiJla3VgoRuVAbCf7wAa teO2fJNfYMQtbfYMSOFhHmeQPq0aY+EINzd27cgVc2PSLlEYBejBPNKxFUCdbskNhqXa9RMltEkDP my0wRnkA==; From: Stephen Finucane To: patchwork@lists.ozlabs.org Subject: [PATCH 1/4] docs: Hardcode username, password Date: Sat, 6 Oct 2018 22:45:03 +0100 Message-Id: <20181006214506.22720-2-stephen@that.guru> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20181006214506.22720-1-stephen@that.guru> References: <20181006214506.22720-1-stephen@that.guru> X-AuthUser: stephen@that.guru X-BeenThere: patchwork@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Patchwork development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: patchwork-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Patchwork" This makes these commands more copy-pasteable. Signed-off-by: Stephen Finucane --- 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 ` 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.