📖 updated developing locally with docker

This commit is contained in:
Abdullah Adeel 2022-01-15 16:39:31 +05:00
parent 364ec5f871
commit 2d20199c8c
2 changed files with 25 additions and 1 deletions

View File

@ -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

View File

@ -1,7 +1,7 @@
Getting Up and Running Locally
==============================
.. index:: pip, virtualenv, PostgreSQL
.. index:: pip, virtualenv, PostgreSQL, MySQL
Setting Up Development Environment