matomo-dev-environment icon indicating copy to clipboard operation
matomo-dev-environment copied to clipboard

Find a way to make it work with an existing Piwik install

Open mnapoli opened this issue 10 years ago • 5 comments

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.

mnapoli avatar Dec 04 '14 04:12 mnapoli

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).

mnapoli avatar Dec 04 '14 19:12 mnapoli

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

mattab avatar Mar 13 '15 01:03 mattab

I honestly don't know how long it would take.

mnapoli avatar Mar 13 '15 03:03 mnapoli

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

halfdan avatar Apr 11 '15 10:04 halfdan

For people stumbling on this, see https://github.com/piwik/piwik/pull/8542

mnapoli avatar Aug 11 '15 09:08 mnapoli