Question

I'm trying to set up a dev environment for my team to work together on 1 Magento project. But I don't know if I should use a shared server with a Magento installation or if we should all install Magento locally and share a database/git repo?

Was it helpful?

Solution

I don't think there is a silver bullet solution on this.
All I can say is how we do it.
We've setup a docker environment using the suite created by Fabrizio Balliano.
We made some additional changes to it.

  • we added a sample data sql with some products that gets installed when the db container is created (using the /docker-entrypoint-initdb.d/ feature).
  • we created a make file that contains some wrappers for the docker commands because they are hard to remember. Example make ssh is an alias for @docker exec -it --user www-data magento.container.name.here bash in order to get cli access to the container. make uninstall will destroy the containers and cleanup after them. make install will create all containers and so on.

This way, everyone has the same environment and the same settings (that can be matched to the live server).
We needed at one point to add elasticsearch to the project. We just pulled up a docker image for elasticsearch and that's it. It got versioned and everyone had it at the next git pull.
When a new person comes in the project they just git clone the repo, run make install and everything is set up.
Draw backs: - it only works perfectly on linux. It can be made to work on mac (and maybe windows) but we did not bother. - it introduces dev dependencies like docker and gnu makefile.

OTHER TIPS

We personally have installed Magento locally through Bitnami VM and we share a git repository. When we have to get the project into a production server we just clone the repo and the database.

Licensed under: CC-BY-SA with attribution
Not affiliated with magento.stackexchange
scroll top