matomo-dev-environment
matomo-dev-environment copied to clipboard
Find a way to make it work with an existing Piwik install
I've been trying to use the Vagrant box with my Piwik install, but with no success until now.
piwik/
# contains Piwik code
piwik-dev-environment/
...
www/
piwik/ # hey Piwik is cloned here again
I've tried symlinking piwik-dev-environment/www/piwik to the existing Piwik install but VirtualBox doesn't like that (since the simlinked repo is outside of the VM).
How do you do it yourselves?
Should we consider merging that in Piwik's repo? I'd love (and I guess users too) to be able to do just git clone and vagrant up on the Piwik repository.
Maybe instead we could do something like Laravel (but much simpler):
- this repo is used to create a Vagrant box
- we distribute the box on https://vagrantcloud.com
- then we can use the box in the piwik repository (
vagrant init piwk)
That way we keep piwik/piwik clean while still having the vagrant VM right inside of it.
I'll have a look into that soon if nobody sees downsides with that (I badly need a VM).
we distribute the box on https://vagrantcloud.com
it sounds like a good idea. How much work would be involved in this?
Also +1 if it help developers getting started with developing for Piwik. If so we want to explain how to use the vagrant thing in the Setting up developer guide here: http://developer.piwik.org/guides/getting-started-part-1#getting-setup-to-extend-piwik
I honestly don't know how long it would take.
The usual way this is handled is instead of cloning the code repo to www/piwik it would be NFS mounted into the vm (via sync folders). So the setup would be like @mnapoli already has it.
e.g. https://github.com/TryGhost/Ghost-Vagrant/blob/master/Vagrantfile#L38
For people stumbling on this, see https://github.com/piwik/piwik/pull/8542