Search code examples
laravellaravel-5homestead

Homestead.yaml file not adding project folder in vagrant | Mac os


I am using mac os and just install vagrant and configured homestead.yaml file but after vagrant up command also tried vagrant reload --provision

Also database not created in mysql.

Here is my homestead.yaml file

ip: "192.168.10.10"
memory: 3048
cpus: 2
provider: virtualbox

authorize: ~/.ssh/id_rsa.pub

keys:
    - ~/.ssh/id_rsa

folders:
    - map: /Users/myname/mytest
      to: /home/vagrant/mytest

sites:
      - map: mytest.local
      to : /home/vagrant/mytest/public

databases:
    -  mytest

can someone help me ?


Solution

  • Finally, I found the solution.

    to add path we need to add ~(tilde) sign it refers as a home directory in mac.

    updated yaml file.

    ip: "192.168.10.10"
    memory: 3048
    cpus: 2
    provider: virtualbox
    
    authorize: ~/.ssh/id_rsa.pub
    
    keys:
        - ~/.ssh/id_rsa
    
    folders:
        - map: ~/myname/mytest
          to: /home/vagrant/mytest
    
    sites:
          - map: mytest.local
          to : /home/vagrant/mytest/public
    
    databases:
        -  mytest