Include tips on how to develop with docker #4370
Replies: 1 comment
-
The section you're referring to is titled "Execute Management Commands", and In local development, the whole codebase is mounted as volume: cookiecutter-django/{{cookiecutter.project_slug}}/local.yml Lines 22 to 23 in fbc2373 Which means that migration files created in a container should appear on your host machine. |
Beta Was this translation helpful? Give feedback.
-
One question that I haven't seen answered in the docs is how to do development using Docker, specifically how to handle migrations. There is a note about running
migrate
in the container, but no guidance on how to create the migrations (usingmakemigrations
).From what I've gathered, "best practice" would be to install Django on the dev machine and run
python -m manage makemigrations
and only then run themigrate
command in the container.I'm happy to create the PR for this, but I wanted to make sure that there is some agreement that this is the "right" way to do this?
Beta Was this translation helpful? Give feedback.
All reactions