I have a per-project installation of Homestead in my Laravel project, using the guide at https://laravel.com/docs/5.4/homestead#per-project-installation.
I want the Homestead.yaml file to map the project directory as a folder accessible in the Vagrant VM.
I want to do this such that the Homestead.yaml file can be shared between development machines without alteration.
The Homestead.yaml file is in the project directory as is the Vagrantfile file.
Therefore I want to identify the project directory relatively, rather than by its full path.
Something like:
folders:
-
map: %CurrentDir%
to: /home/vagrant/Code/project
(I invented %CurrentDir% for the sake of this example.)
Or even better without hardcoding the name of the project directory.
I'm on Windows and would prefer a platform-agnostic solution.
How can I do this?
This works on macOSX w/ vagrant 2.0.1 / homestead 6.5:
folders:
-
map: ./
to: /home/vagrant/code/project
On Windows 10 this works:
folders:
-
map: %CurrentDir%
to: /home/vagrant/Code/project
Yet to test on another platform...
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With