This file contains hidden or 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 | |
echo "Magento 2: Smart Reindex & Category Product Check 🚀" | |
echo "----------------------------------------------------" | |
# Check if we are in the Magento root directory | |
if [ ! -f "bin/magento" ]; then | |
echo "⛔ Error: This script must be run from the Magento project root." | |
exit 1 | |
fi |
This file contains hidden or 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
mkdir mageos && \ | |
cd mageos && \ | |
composer create-project --repository-url=https://repo.mage-os.org/ mage-os/project-community-edition . && \ | |
bin/magento setup:install \ | |
--db-host=DATABASE_HOST \ | |
--db-name=DATABASE_NAME \ | |
--db-user=DATABASE_USER \ | |
--db-password=DATABASE_PASSWORD \ | |
--base-url=https://www.example.com/ \ | |
--base-url-secure=https://www.example.com/ \ |