From 2d20199c8c1fead23510e6ba2bc98e696bf973f8 Mon Sep 17 00:00:00 2001 From: Abdullah Adeel Date: Sat, 15 Jan 2022 16:39:31 +0500 Subject: [PATCH] =?UTF-8?q?=F0=9F=93=96=20updated=20`developing=20locally?= =?UTF-8?q?=20with=20docker`?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/developing-locally-docker.rst | 24 ++++++++++++++++++++++++ docs/developing-locally.rst | 2 +- 2 files changed, 25 insertions(+), 1 deletion(-) diff --git a/docs/developing-locally-docker.rst b/docs/developing-locally-docker.rst index 17e47bfb4..0af97842b 100644 --- a/docs/developing-locally-docker.rst +++ b/docs/developing-locally-docker.rst @@ -124,6 +124,30 @@ Consider the aforementioned ``.envs/.local/.postgres``: :: The three envs we are presented with here are ``POSTGRES_DB``, ``POSTGRES_USER``, and ``POSTGRES_PASSWORD`` (by the way, their values have also been generated for you). You might have figured out already where these definitions will end up; it's all the same with ``django`` service container envs. +.. note:: + + If you are using MySQL, the ``.env`` structure will adapt accordingly. :: + + .envs + ├── .local + │ ├── .django + │ └── .mysql + └── .production + ├── .django + └── .mysql + + where the ``.mysql`` will contain: :: + + # MySQL + # ------------------------------------------------------------------------------ + MYSQL_HOST=mysql + MYSQL_PORT=3306 + MYSQL_DATABASE={{ cookiecutter.project_slug }} + MYSQL_USER=ssdDFA2FEaFeFDasdG2432TT23TWE + MYSQL_PASSWORD=aldAdds82FD89rnkDFFfsNFDaf8493H + MYSQL_ROOT_PASSWORD=jSljDz4whHuwO3aJIgVBrqEml5Ycbghorep4uVJ4xjDYQu0LfuTZdctj7y0YcCLu + + One final touch: should you ever need to merge ``.envs/.production/*`` in a single ``.env`` run the ``merge_production_dotenvs_in_dotenv.py``: :: $ python merge_production_dotenvs_in_dotenv.py diff --git a/docs/developing-locally.rst b/docs/developing-locally.rst index 48eb0394b..7468a9431 100644 --- a/docs/developing-locally.rst +++ b/docs/developing-locally.rst @@ -1,7 +1,7 @@ Getting Up and Running Locally ============================== -.. index:: pip, virtualenv, PostgreSQL +.. index:: pip, virtualenv, PostgreSQL, MySQL Setting Up Development Environment