support docker-sync for mac users

This commit is contained in:
krzysztofhoffmann 2018-09-12 18:55:34 +02:00
parent 87db64ec85
commit 4275594413
5 changed files with 42 additions and 0 deletions

View File

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

View 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' ]

View File

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 56 KiB

View File

@ -0,0 +1,10 @@
version: "3"
services:
django:
volumes:
- django-sync:/app:nocopy
volumes:
django-sync:
external: true