Magento 2 environments local with Docker and Docker Compose
Clone the repository (e.g. inside you home dir):
marcio@maciel:~$ mkdir -p ~/workspace/stack-tools
marcio@maciel:~$ cd ~/workspace/stack-tools
marcio@maciel:~/worksspace/tool$ git clone [email protected]:marciomaciel/magento2-development-stack.git .the
~workspace/stack-toolsdirectory is just one example. Clone where you deem appropriate.
Add ~/workspace/stack-tools/bin directory to your user's $PATH, so that you can run scripts from anywhere:
marcio@maciel:~$ echo "export PATH=\"$(realpath ~/)/workspace/stack-tools/bin:\$PATH\"" >> ~/.bash_profileReopen the terminal to get new $PATH config and type the command dev and press the enter key to test whether it has been successfully configured. If the message below is displayed, your stack tools are successfully configured according to the example below:
marcio@maciel:~$ dev
Not in an project directory. Please check and try again
marcio@maciel:~$To create a new project, create an empty directory and copy the directory .dockerconf inside skell to you new directory. Then run the command dev setup to create env variables.
marcio@maciel:~$ mkdir -p ~/workspace/projects/magento
marcio@maciel:~$ cd ~/workspace/projects/magento
marcio@maciel:~/workspace/projects/magento$ cp -R ~/workspace/stack-tools/skel/.dockerconf .
marcio@maciel:~/workspace/projects/magento$ dev setup