11#! /bin/bash
22BASE_URL=${1:- m2.localhost}
3- MAGE_VERSION=${2:- 2.3.3 }
3+ MAGE_VERSION=${2:- 2.4.0 }
44
55# load the DB env information
66DIR=" ${BASH_SOURCE%/* } "
@@ -11,7 +11,7 @@ bin/restart
1111sleep 1 # Ensure containers are started...
1212
1313echo " Downloading Magento ${MAGE_VERSION} with Sample data..."
14- bin/root curl -o /var/www/html/magento.tar.gz http ://pubfiles.nexcess.net/magento/ce-packages/magento2-with-samples-${MAGE_VERSION} .tar.gz
14+ bin/root curl -o /var/www/html/magento.tar.gz https ://pubfiles.nexcess.net/magento/ce-packages/magento2-with-samples-${MAGE_VERSION} .tar.gz
1515bin/rootnotty tar xvfz /var/www/html/magento.tar.gz
1616bin/rootnotty rm /var/www/html/magento.tar.gz
1717bin/rootnotty cp /var/www/html/nginx.conf.sample /var/www/html/nginx.conf
@@ -23,22 +23,27 @@ bin/root curl -o /usr/local/bin/magerun https://files.magerun.net/n98-magerun2-l
2323bin/rootnotty chmod +x /usr/local/bin/magerun
2424
2525echo " Forcing reinstall of composer deps to ensure perms & reqs..."
26- bin/clinotty composer install
26+ bin/clinotty composer global require hirak/prestissimo
27+ bin/clinotty composer update
2728
2829bin/clinotty bin/magento setup:install \
2930 --db-host=$MYSQL_HOST \
3031 --db-name=$MYSQL_DATABASE \
3132 --db-user=$MYSQL_USER \
3233 --db-password=$MYSQL_PASSWORD \
3334 --base-url=https://$BASE_URL / \
35+ --base-url-secure=https://$BASE_URL / \
36+ --backend-frontname=admin \
3437 --admin-firstname=Admin \
3538 --admin-lastname=User \
3639 --admin-email=admin@test.loc \
3740 --admin-user=magento \
3841 --admin-password=magento2\
39- --language=de_DE \
42+ --language=en_US \
4043 --currency=EUR \
4144 --timezone=Europe/Berlin \
45+ --search-engine=elasticsearch7 \
46+ --elasticsearch-host=elasticsearch \
4247 --use-rewrites=1
4348
4449echo " Turning on developer mode.."
@@ -48,6 +53,12 @@ bin/clinotty bin/magento indexer:reindex
4853echo " Forcing deploy of static content to speed up initial requests..."
4954bin/clinotty bin/magento setup:static-content:deploy -f
5055
56+ echo " Re-indexing with Elasticsearch..."
57+ bin/clinotty bin/magento indexer:reindex
58+
59+ echo " Disable Magento 2FAuth module..."
60+ bin/clinotty bin/magento module:disable Magento_TwoFactorAuth
61+
5162echo " Clearing the cache for good measure..."
5263bin/clinotty bin/magento cache:flush
5364
@@ -61,11 +72,13 @@ bin/clinotty composer require bitexpert/magento2-force-customer-login:*
6172echo " Enabling Force Login module..."
6273bin/clinotty bin/magento module:enable BitExpert_ForceCustomerLogin
6374bin/clinotty bin/magento setup:upgrade
64- bin/clinotty bin/magento setup:di:compile
6575
6676echo " Installing Sample data..."
6777bin/clinotty bin/magento sampledata:deploy
6878
79+ echo " Generating SSL certificate..."
80+ bin/setup-ssl $BASE_URL
81+
6982echo " Restarting containers with host bind mounts for dev..."
7083bin/restart
7184
0 commit comments