mirror of
https://github.com/cookiecutter/cookiecutter-django.git
synced 2024-11-25 19:14:03 +03:00
How to pre-commit in Docker Development
It is clear that pre-commit cannot work inside Docker containers and it can only work with git stored on the local machine since its not in a shared volume with the containers. Therefore, it should be noted that anyone who uses this cookicutter with pre-commit already generated by default in every project, should start using pre-commit into their general workflow.
This commit is contained in:
parent
103cc9f2ff
commit
370cefdf24
|
@ -32,6 +32,17 @@ This can take a while, especially the first time you run this particular command
|
|||
|
||||
Generally, if you want to emulate production environment use ``production.yml`` instead. And this is true for any other actions you might need to perform: whenever a switch is required, just do it!
|
||||
|
||||
Before doing any commit, pre-commit hooks are required on your local machine, outside of docker::
|
||||
|
||||
$ pip install -r requirements/local.txt # Advisable within a virtualenv if possible
|
||||
$ git init # A git repo is required for pre-commit to install
|
||||
$ pre-commit install
|
||||
|
||||
.. note::
|
||||
|
||||
the `pre-commit` hook exists in the generated project as default.
|
||||
For the details of `pre-commit`, follow the `pre-commit`_ site.
|
||||
|
||||
|
||||
Run the Stack
|
||||
-------------
|
||||
|
|
Loading…
Reference in New Issue
Block a user