Skip to content

Commit f333982

Browse files
gagarinephiltrep
authored andcommitted
instruction to improve d4m speed (laradock#597)
* instruction to improve d4m speed * Move mac speed doc to misc section, remove docker-sync instructions
1 parent 00550d3 commit f333982

1 file changed

Lines changed: 32 additions & 5 deletions

File tree

README.md

Lines changed: 32 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,7 @@ LaraDock is configured to run Laravel Apps by default, and it can be modified to
9696
- [PHPStorm Debugging Guide](#phpstorm-debugging)
9797
- [Keep track of your LaraDock changes](#keep-tracking-LaraDock)
9898
- [Upgrading LaraDock](#upgrading-laradock)
99+
- [Improve speed on MacOS](#Speed-MacOS)
99100
- [Common Problems](#Common-Problems)
100101
- [Related Projects](#related-projects)
101102
- [Help & Questions](#Help)
@@ -377,10 +378,6 @@ Do the same for each project `project2.conf`, `project3.conf`,...
377378
7 - Create your project Databases. Right now you have to do it manually by entering your DB container, until we automate it soon.
378379
379380
380-
381-
382-
383-
384381
<a name="Usage"></a>
385382
## Usage
386383
@@ -1755,8 +1752,38 @@ Moving from Docker Toolbox (VirtualBox) to Docker Native (for Mac/Windows). Requ
17551752
"Warning Containers Data might be lost!"
17561753

17571754

1755+
<a name="Speed-MacOS"></a>
1756+
### Improve speed on MacOS
1757+
1758+
Sharing code into Docker containers with osxfs have very poor performance compared to Linux. You can get around this issue by using NFS to share your files betwen your host and your container.
1759+
1760+
#### How to share files using NFS (d4m-nfs)
1761+
1762+
[d4m-nfs](https://github.com/IFSight/d4m-nfs) automatically mount NFS volume instead of osxfs one.
1763+
1764+
1. Update docker File Sharing preferences. You should have only /tmp.
1765+
2. Restart docker.
1766+
3. Clone d4m-nfs repository in your home directory
1767+
```bash
1768+
$ git clone https://github.com/IFSight/d4m-nfs ~/d4m-nfs
1769+
```
1770+
4. Edit/create the file ~/d4m-nfs/etc/d4m-nfs-mounts.txt with this configuration:
1771+
```
1772+
/Users:/Users
1773+
/Volumes:/Volumes
1774+
/private:/private
1775+
```
1776+
5. Empty the file /etc/exports and clean it up if required (there may be collisions if you come from Vagrant or if you already executed the d4m-nfs.sh script)
1777+
6. Run the d4m-nfs.sh script
1778+
```bash
1779+
~/d4m-nfs/d4m-nfs.sh
1780+
```
1781+
1782+
That's it! Now you just have to bring your container up with docker compose. For example:
17581783
1759-
1784+
```bash
1785+
docker-compose up -d nginx mysql
1786+
```
17601787
17611788
17621789
<br>

0 commit comments

Comments
 (0)