Last active
October 3, 2018 18:09
-
-
Save cristiano-pacheco/fb84efc000d9091ee481b5cf82ef0401 to your computer and use it in GitHub Desktop.
Magento 2 Docker
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
##### Instalação do repositório | |
mkdir magento2 && cd $_ | |
git init | |
git remote add origin https://github.com/markoshust/docker-magento.git | |
git fetch origin | |
git checkout origin/master -- compose/magento-2 | |
mv compose/magento-2/* . | |
rm -rf compose .git | |
git init | |
git add . | |
git commit -m "start" | |
##### Alterar arquivo hosts | |
sudo nano /etc/hosts | |
127.0.0.1 local.magento2.com.br | |
##### Download Magento | |
bin/download 2.2.6 | |
##### Composer install | |
docker-compose up -d | |
sudo mkdir ~/.composer && chmod 777 ~/.composer | |
bin/composer install | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
bin/cli chmod u+x bin/magento | |
docker-compose exec phpfpm /usr/local/bin/php ./bin/magento setup:install \ | |
--db-host=db \ | |
--db-name=magento \ | |
--db-user=magento \ | |
--db-password=magento \ | |
--base-url=http://local.magento2.com.br/ \ | |
--admin-firstname=Chris \ | |
--admin-lastname=Pacheco \ | |
--admin-email=chris.spb25@gmail.com \ | |
--admin-user=admin \ | |
--admin-password=Matrix0123 \ | |
--language=en_US \ | |
--currency=USD \ | |
--timezone=America/Sao_Paulo \ | |
--use-rewrites=1 | |
bin/fixperms | |
echo "Turning on developer mode.." | |
bin/magento deploy:mode:set developer | |
bin/magento indexer:reindex |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment