Last active
December 21, 2021 20:55
-
-
Save dambrogia/f233f1316b382f270058db3ab60c9579 to your computer and use it in GitHub Desktop.
warden_local_env_install.sh
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
function install_local_env { | |
sudo yum install -y nano vim zsh htop curl wget php-pecl-xdebug | |
git clone https://github.com/ohmyzsh/ohmyzsh.git /home/www-data/.oh-my-zsh; | |
cp /home/www-data/.oh-my-zsh/templates/zshrc.zsh-template /home/www-data/.zshrc; | |
sed -i s^robbyrussell^candy^g /home/www-data/.zshrc; | |
git clone https://github.com/dambrogia/oh-my-zsh-plugin-magento-2.git /home/www-data/.oh-my-zsh/custom/plugins/magento-2 | |
sed -i s^"plugins=(git)"^"plugins=(git magento-2)"^g /home/www-data/.zshrc | |
echo "/var/www/html" > /home/www-data/.oh-my-zsh/custom/plugins/magento-2/mage_root.txt | |
sudo touch /var/log/xdebug.log | |
sudo chown www-data:www-data /var/log/xdebug.log | |
sudo chown www-data:www-data /home/www-data -R | |
echo " | |
zend_extension=/usr/lib64/php/modules/xdebug.so | |
xdebug.remote_enable = true | |
xdebug.remote_autostart = true | |
xdebug.remote_host = host.docker.internal | |
xdebug.remote_port = 9000 | |
xdebug.remote_log = /var/log/xdebug.log | |
xdebug.max_nesting_level = 250 | |
" | |
echo "Place these in /etc/php.d/15-xdebug.ini and restart the container." | |
echo ' | |
function m-rebuild() { | |
( | |
cd $(m2:get_root) | |
composer install && \ | |
m2 setup:upgrade && \ | |
rm -rf generated && \ | |
grunt exec:psa && \ | |
grunt less:psa && \ | |
m2 cache:flush | |
) | |
}' >> /home/www-data/.zshrc | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment