-
Notifications
You must be signed in to change notification settings - Fork 17
Before the installation
Alexandre Jardin edited this page Jan 29, 2019
·
5 revisions
What you will find below is an example of how you can organize your local environment. It's absolutely not a requirement, but it can help you te be more efficient when using Docker and Magento 2 by managing them at the same place.
In general, there are two ways to play with Docker on a project.
- Place everything in the same repository. It will be easier to have something tightly coupled and all project members will be able to follow changes at the infrastructure level without having to check another repository. But if you have multiple projects running on the same technology, it can be painful to roll out a change on all those projects.
- Separate the environment description and the project into different repositories. If you change something on the environment repository, it can be quickly roll out on all your projects. But it will be more difficult to have something tightly coupled since the reference must be the most generic possible to allow the usage on different projects.
But it's possible to take advantage of both solutions by using the inheritance!
- The environment description and the project are separated into different repositories and locally cloned into different directories.
- Each of these repositories has a specific
Makefile
that provides several useful commands to simplify the management in its context (environment or project). - The
Makefile
located into the project directory includes theMakefile
located in the environment directory. Which allows to manage Docker along the project with a single window in your terminal.
You will find further technical details in the following pages.