This is full Docker setup for Magento 2 Development with Nginx, SSL, PHPMyAdmin, PHP 7.3, ElasticSearch 7, Grunt, Mailhog, Magerun 2
- Clone this repo
- Build the Dockerfile to setup your php image (this is called m2php in the docker-compose file but you can call it whatever you want)
- Update the docker-compose with the name of php-fpm image you built in step 2
- Update your confs/default.conf and dev.test.conf in the reverse-proxy folder for your chosen domain.
- Your are setup for *.dev.test domains now (ex. magento.dev.test) and if you don't want that you need to generate new SSL files in the devcerts/private folder for your chosen domain.
- Update your hosts file and point 127.0.0.1 to your chosen domain
- Run docker-compose up -d to set your container and pull down all the other neccassary images (phpmyadmin, elasticsearch, mailhog, etc)
- Delete the file in the /magento directory and install magento 2 into that folder.
- Delete the generated/code and var/cache folders
- Run setup:upgrade
That's it! You should be up and running.