mirror of
https://github.com/cookiecutter/cookiecutter-django.git
synced 2025-08-09 06:24:52 +03:00
support docker-sync for mac users
This commit is contained in:
parent
87db64ec85
commit
4275594413
|
@ -59,6 +59,21 @@ To run in a detached (background) mode, just::
|
||||||
|
|
||||||
$ docker-compose up -d
|
$ docker-compose up -d
|
||||||
|
|
||||||
|
Developing on Mac OS
|
||||||
|
--------------------
|
||||||
|
|
||||||
|
If you are using Mac OS you should be familiar with long timeouts from a filesystem. Sharing files into containers is really slow. To resolve this issue is use an external tool like docker-sync.
|
||||||
|
First of all you need to install docker-sync::
|
||||||
|
|
||||||
|
$ gem install docker-sync
|
||||||
|
|
||||||
|
After this, run::
|
||||||
|
|
||||||
|
$ docker-sync start
|
||||||
|
|
||||||
|
Run composer::
|
||||||
|
|
||||||
|
$ docker-compose -f local.yml -f local-sync.yml up
|
||||||
|
|
||||||
Execute Management Commands
|
Execute Management Commands
|
||||||
---------------------------
|
---------------------------
|
||||||
|
|
11
{{cookiecutter.project_slug}}/docker-sync.yml
Normal file
11
{{cookiecutter.project_slug}}/docker-sync.yml
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
version: "2"
|
||||||
|
|
||||||
|
options:
|
||||||
|
compose-file-path: 'local.yml'
|
||||||
|
compose-dev-file-path: 'local-sync.yml'
|
||||||
|
|
||||||
|
syncs:
|
||||||
|
django-sync:
|
||||||
|
host_disk_mount_mode: 'cached'
|
||||||
|
src: '.'
|
||||||
|
sync_excludes: [ '.git', '.idea' ]
|
|
@ -25,6 +25,10 @@ Switch to *Docker Compose* and select `local.yml` file from directory of your pr
|
||||||
|
|
||||||
.. image:: images/4.png
|
.. image:: images/4.png
|
||||||
|
|
||||||
|
If you want to use docker-sync ( mac users only ) you should add also `local-sync.yml`
|
||||||
|
|
||||||
|
.. image:: images/4a.png
|
||||||
|
|
||||||
Having that, click *OK*. Close *Settings* panel, and wait few seconds...
|
Having that, click *OK*. Close *Settings* panel, and wait few seconds...
|
||||||
|
|
||||||
.. image:: images/7.png
|
.. image:: images/7.png
|
||||||
|
@ -44,6 +48,8 @@ After few seconds, all *Run/Debug Configurations* should be ready to use.
|
||||||
.. image:: images/f4.png
|
.. image:: images/f4.png
|
||||||
* and many others..
|
* and many others..
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Known issues
|
Known issues
|
||||||
------------
|
------------
|
||||||
|
|
||||||
|
|
BIN
{{cookiecutter.project_slug}}/docs/pycharm/images/4a.png
Normal file
BIN
{{cookiecutter.project_slug}}/docs/pycharm/images/4a.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 56 KiB |
10
{{cookiecutter.project_slug}}/local-sync.yml
Normal file
10
{{cookiecutter.project_slug}}/local-sync.yml
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
version: "3"
|
||||||
|
|
||||||
|
services:
|
||||||
|
django:
|
||||||
|
volumes:
|
||||||
|
- django-sync:/app:nocopy
|
||||||
|
|
||||||
|
volumes:
|
||||||
|
django-sync:
|
||||||
|
external: true
|
Loading…
Reference in New Issue
Block a user