I use vagrant because I need PHP 7. I then have a ~/Homestead folder with the homestead.yaml file. I use the file to map my Code folder to the virtuel machine.
For each of my projects, I need to edit the homestead.yaml file and add the site like this:
sites:
- map: larabook.app
to: /home/vagrant/Code/laracast/public
- map: larajobs.app
to: /home/vagrant/Code/larajobs/public
For each site, I also update my hosts file.
In the Homestead folder:
vagrant up
Or:
vagrant up --provision
this is my homestead yaml file that runs 3 projects and each has their own local adress to be reached.
---
ip: "192.168.10.10"
memory: 2048
cpus: 1
provider: virtualbox
authorize: ~/.ssh/id_rsa.pub
keys:
- ~/.ssh/id_rsa
folders:
- map: /www/sites/Code
to: /home/vagrant/Code
sites:
- map: dev.dev
to: /home/vagrant/Code/dev/public
- map: jp-it.dev
to: /home/vagrant/Code/jp-it/public
- map: got.dev
to: /home/vagrant/Code/got/public
databases:
- dev
- got
- jpit
variables:
- key: APP_ENV
value: local
# blackfire:
# - id: foo
# token: bar
# client-id: foo
# client-token: bar
# ports:
# - send: 93000
# to: 9300
# - send: 7777
# to: 777
# protocol: udp
same as ChristianGerdes i run vagrant up instead of homestead because of php7
dont forget to run command "vagrant provision" after you update the yaml file
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community