I’m currently using vagrant for all my development work. Having said that I see that most people seem to be setting up a single box per project. However, I have a single box that is shared across multiple projects. I’m kind of treating the vagrant box as a “remote” dev server where one would very likely have several sites hosted. I’m on a mac and this is my mac directory structure for such a set-up.
~/Workspace/vm/profile/*
Each separate vagrant/puphpet zip file goes under here. So I essentially do this to start up my machine currently.
cd ~/Workspace/vm/profile/[name]
vagrant up
I than have the shared folder located in a separate directory.
~/Workspace/vm/box/[box_name]
So for example My vagrant sync folder mapping is something like this:
local: /home/username/Workspace/vm/box/rusty (box named after dog )
vm /var/www
Which allows me to just add a new site like below and just manually setup the db and vhost.
vm: /var/www/local.test
local: /home/username/Workspace/vm/box/rusty/local.test
I haven’t been really running into any issues with this setup and it allows me to easily get up and running with a new site if I need to without provisioning boxes if the environment can be the same. It just seems a little unconventional.
Thoughts?