Homestead.yaml文件未在流浪汉中添加项目文件夹苹果系统

时间:2019-05-24 13:41:11

标签: laravel laravel-5 homestead

我正在使用Mac OS,仅安装了流浪汉并配置了homestead.yaml文件,但是在vagrant up命令之后也尝试了vagrant reload --provision

还没有在mysql中创建数据库。

这是我的homestead.yaml文件

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

有人可以帮助我吗?

1 个答案:

答案 0 :(得分:-1)

最后,我找到了解决方案。

要添加路径,我们需要添加〜(波浪号)符号,它在Mac中是指主目录。

更新的Yaml文件。

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