by Devin Yang
(This article was automatically translated.)

Published - 4 years ago ( Updated - 4 years ago )

This article introduces how to use NFS mode in D-Laravel to speed up the creation of Project on MacOS.

1. Use root to modify /etc/exports, for example, execute sudo vim /etc/exports (if you know how to use vim). join
macOS Catalina
/System/Volumes/Data/Users -alldirs -mapall=501:20 localhost (async,rw,anonuid=1000,anongid=1000)

Old operating systems, eg: macOS Mojave
/Users -alldirs -mapall=501:20 localhost (async,rw,anonuid=1000,anongid=1000)


You can enter the id to view your own uid and gid on the Mac. No surprise, everyone should be 501 and 20

2. Use root to modify /etc/nfs.conf and add
nfs.server.mount.require_resv_port = 0

3. Start nfsd.
sudo nfsd enable

Fourth, confirm the Exports status
showmount -e
Exports list on localhost:
/System/Volumes/Data/Users localhost

5. Download the latest version of D-Laravel, for example, here I named it nfstest.
git clone https://github.com/DevinY/dlaravel.git nfstest

6. Enter the nfs mode, the default is port 80, if your port 80 has been occupied by other programs,
Please adjust the port or docker-compose-nfs.yml first, for example: (fragment)
 web:
  image: nginx
  dns: 8.8.8.8
  ports:
    - "8080:80"
    - "80443:443"
If your port 80 is not temporarily used, then you should be able to directly execute the nfs settings.
cd nfstest
./console nfs

7. After starting, let’s build a Project and try it out, you will find that the speed is much faster
./create blog

Additional Supplements:
#Restart nfsd
sudo nfsd restart

# stop nfsd
sudo nfsd stop

# start nfsd
sudo nfsd start

# Permanently stop nfsd
sudo nfsd disable

# View status
sudo nfsd status




 

Tags: docker laravel nfs

Devin Yang

Feel free to ask me, if you don't get it.:)

No Comment

Post your comment

Login is required to leave comments

Similar Stories


nginx,dlaravel

How to configure HTTPS on nginx to get an SSL A+ score from Qualys

This article describes how to adjust the ssl settings of nginx so that the website can obtain an SSL report and get an A+ rating. Here I am using letsencrypt free credentials. As long as you use the official Docker nginx new version image preset by D-Laravel, you should be able to achieve the same effect as mine. You can check your host SSL settings through the following. https://www.ssllabs.com/ssltest/index.html

dlaravel

D-Laravel v1.5.0 is a new version.

1. Change the image generation method of fpm, optimize dockerfiles/fpm/php7.x/Dockerfiles, and make it easier to set and adjust extension packages. 2. Adjust docker-compose-build.yml, and in the Project directory of D-Laravel, You can quickly build your own image through ./console build. And many more changes....

laravel

After upgrading Laravel 8.8, I integrated the articles and notes together

Laravel 8 has undergone major revisions, and my website has also been revised accordingly. The "notes" and "articles" on my website were originally separated into two blocks. This time I integrated him together. Anyway, there are not many articles, and the combined content seems to be more. :p