-
Notifications
You must be signed in to change notification settings - Fork 73
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #196 from websharp/master
Magento 2.4 upgrade finishing
- Loading branch information
Showing
15 changed files
with
426 additions
and
305 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -63,6 +63,7 @@ public function getBackUrl() | |
} | ||
|
||
/** | ||
* @return void | ||
*/ | ||
protected function updateButtonControls() | ||
{ | ||
|
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
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
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
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
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
#!/bin/bash | ||
BASE_URL=${1:-m2.localhost} | ||
MAGE_VERSION=${2:-2.3.3} | ||
MAGE_VERSION=${2:-2.4.0} | ||
|
||
# load the DB env information | ||
DIR="${BASH_SOURCE%/*}" | ||
|
@@ -11,7 +11,7 @@ bin/restart | |
sleep 1 #Ensure containers are started... | ||
|
||
echo "Downloading Magento ${MAGE_VERSION} with Sample data..." | ||
bin/root curl -o /var/www/html/magento.tar.gz http://pubfiles.nexcess.net/magento/ce-packages/magento2-with-samples-${MAGE_VERSION}.tar.gz | ||
bin/root curl -o /var/www/html/magento.tar.gz https://pubfiles.nexcess.net/magento/ce-packages/magento2-with-samples-${MAGE_VERSION}.tar.gz | ||
bin/rootnotty tar xvfz /var/www/html/magento.tar.gz | ||
bin/rootnotty rm /var/www/html/magento.tar.gz | ||
bin/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 | |
bin/rootnotty chmod +x /usr/local/bin/magerun | ||
|
||
echo "Forcing reinstall of composer deps to ensure perms & reqs..." | ||
bin/clinotty composer install | ||
bin/clinotty composer global require hirak/prestissimo | ||
bin/clinotty composer update | ||
|
||
bin/clinotty bin/magento setup:install \ | ||
--db-host=$MYSQL_HOST \ | ||
--db-name=$MYSQL_DATABASE \ | ||
--db-user=$MYSQL_USER \ | ||
--db-password=$MYSQL_PASSWORD \ | ||
--base-url=https://$BASE_URL/ \ | ||
--base-url-secure=https://$BASE_URL/ \ | ||
--backend-frontname=admin \ | ||
--admin-firstname=Admin \ | ||
--admin-lastname=User \ | ||
[email protected] \ | ||
--admin-user=magento \ | ||
--admin-password=magento2\ | ||
--language=de_DE \ | ||
--language=en_US \ | ||
--currency=EUR \ | ||
--timezone=Europe/Berlin \ | ||
--search-engine=elasticsearch7 \ | ||
--elasticsearch-host=elasticsearch \ | ||
--use-rewrites=1 | ||
|
||
echo "Turning on developer mode.." | ||
|
@@ -48,6 +53,12 @@ bin/clinotty bin/magento indexer:reindex | |
echo "Forcing deploy of static content to speed up initial requests..." | ||
bin/clinotty bin/magento setup:static-content:deploy -f | ||
|
||
echo "Re-indexing with Elasticsearch..." | ||
bin/clinotty bin/magento indexer:reindex | ||
|
||
echo "Disable Magento 2FAuth module..." | ||
bin/clinotty bin/magento module:disable Magento_TwoFactorAuth | ||
|
||
echo "Clearing the cache for good measure..." | ||
bin/clinotty bin/magento cache:flush | ||
|
||
|
@@ -61,11 +72,13 @@ bin/clinotty composer require bitexpert/magento2-force-customer-login:* | |
echo "Enabling Force Login module..." | ||
bin/clinotty bin/magento module:enable BitExpert_ForceCustomerLogin | ||
bin/clinotty bin/magento setup:upgrade | ||
bin/clinotty bin/magento setup:di:compile | ||
|
||
echo "Installing Sample data..." | ||
bin/clinotty bin/magento sampledata:deploy | ||
|
||
echo "Generating SSL certificate..." | ||
bin/setup-ssl $BASE_URL | ||
|
||
echo "Restarting containers with host bind mounts for dev..." | ||
bin/restart | ||
|
||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#!/bin/bash | ||
[ -z "$1" ] && echo "Please specify a domain (ex. mydomain.test)" && exit | ||
|
||
# Generate certificate authority if not already setup | ||
if ! docker-compose exec -T -u root app cat /root/.local/share/mkcert/rootCA.pem | grep -q 'BEGIN CERTIFICATE'; then | ||
bin/setup-ssl-ca | ||
fi | ||
|
||
# Generate the certificate for the specified domain | ||
docker-compose exec -T -u root app mkcert -key-file nginx.key -cert-file nginx.crt "$@" | ||
echo "Moving key and cert to /etc/nginx/certs/..." | ||
docker-compose exec -T -u root app chown app:app nginx.key nginx.crt | ||
docker-compose exec -T -u root app mv nginx.key nginx.crt /etc/nginx/certs/ | ||
|
||
# Restart nginx to apply the updates | ||
echo "Restarting containers to apply updates..." | ||
bin/restart |
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
Oops, something went wrong.