mirror of
https://github.com/cookiecutter/cookiecutter-django.git
synced 2025-08-18 02:44:51 +03:00
📖 updated developing locally with docker
This commit is contained in:
parent
364ec5f871
commit
2d20199c8c
|
@ -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
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
Getting Up and Running Locally
|
||||
==============================
|
||||
|
||||
.. index:: pip, virtualenv, PostgreSQL
|
||||
.. index:: pip, virtualenv, PostgreSQL, MySQL
|
||||
|
||||
|
||||
Setting Up Development Environment
|
||||
|
|
Loading…
Reference in New Issue
Block a user