Last active
December 5, 2023 07:40
-
-
Save alex-79/bdf58a23323edf95fa902ffe2d308516 to your computer and use it in GitHub Desktop.
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 | |
create_db="CREATE DATABASE $1 CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;" | |
create_user="GRANT ALL PRIVILEGES ON $1.* TO '$1'@'localhost' IDENTIFIED BY '$1';" | |
flush="FLUSH PRIVILEGES;" | |
mysql -u root -p -e "${create_db}${create_user}${flush}" | |
mkdir $1.local | |
composer create-project --repository-url=https://repo.magento.com/ magento/project-community-edition $1.local | |
cd $1.local | |
php bin/magento setup:install --base-url=http://$1.local/ \ | |
--db-host=localhost --db-name=$1 \ | |
--db-user=$1 --db-password=$1 \ | |
--admin-firstname=Magento --admin-lastname=User --admin-email=user@example.com \ | |
--admin-user=admin --admin-password=admin123 --language=en_US \ | |
--currency=UAH --timezone=Europe/Kiev --use-rewrites=1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment