Remove Magento stuff

This commit is contained in:
Max Bucknell 2019-03-10 11:31:20 +00:00
parent 00fed56823
commit 3303df565d

View file

@ -159,78 +159,3 @@ source "$HOME/.zsh/liquidprompt/liquidprompt"
# Vim! # Vim!
alias vim=nvim alias vim=nvim
# Create MySQL Docker container
function provision_mysql {
mkdir -p "$HOME/Data/5.6/data" && docker run -d\
--name="mysql-5.6" \
-e "MYSQL_ROOT_PASSWORD=root" \
-p 33306:3306 \
-v "$HOME/Data/5.6/data:/tmp/data" \
-v "/var/lib/mysql" \
"mysql:5.6"
}
# Install Magento 2
function install_magento {
local host="$1"
local db_name="$2"
n98-magerun2 setup:install \
--admin-firstname="Max" \
--admin-lastname="Bucknell" \
--admin-email="me@maxbucknell.com" \
--admin-user="max.bucknell" \
--admin-password="password123" \
--base-url="http://$host:15013/index.php/" \
--backend-frontname="admin" \
--db-host="127.0.0.1:33306" \
--db-name="$db_name" \
--db-user="root" \
--db-password="root" \
--language="en_US" \
--currency="EUR" \
--timezone="UTC" \
--use-rewrites="1" \
--use-secure="0" \
--use-secure-admin="0" \
--admin-use-security-key="0" \
--session-save="files"
n98-magerun2 config:store:set "dev/static/sign" "0"
n98-magerun2 config:store:set "web/unsecure/base_static_url" "http://$host:15013/static/"
n98-magerun2 c:f
}
# Find root of Magetno 2 installation
alias find_magento_root='findroot "app/etc/config.php"'
# Start M2 server
function serve_m2 {
local root="$(find_magento_root)"
pushd "$root/pub"
php -S "0.0.0.0:15013" "../phpserver/router.php" "../pub"
popd
}
alias ww='workflow'
# Initialize workflow with Github
function workflow_github {
local root="$(findroot "app/code/Magento")"
pushd "$root"
cp -r "$HOME/dotfiles/share/workflow-github/" "."
cat <<'EOF'
Initialized workflow Docker and Docker Compose files in the Magento root.
Configure your volumes to sync what you are working on, edit .docker/local.env
and run:
$ workflow up && workflow mfi
To install Magento. Happy hacking!
EOF
popd
}