Skip to content

Instantly share code, notes, and snippets.

@thejimbirch
Forked from sean-e-dietrich/contrib
Last active June 16, 2021 20:03
Show Gist options
  • Save thejimbirch/3cd2ca0f99ae43adc506cb712a5dc61f to your computer and use it in GitHub Desktop.
Save thejimbirch/3cd2ca0f99ae43adc506cb712a5dc61f to your computer and use it in GitHub Desktop.
Contrib Command For Docksal
#!/bin/bash
NAME=$1
VERSION=${2:-8.8.x}
if [[ -z "${NAME}" ]]; then
NAME=$(uuidgen)
fi
if [[ -d $NAME ]]; then
echo "$NAME already exists. Exiting..."
exit 1
fi
echo "Cloning Drupal Git Repo..."
git clone --branch $VERSION https://git.drupalcode.org/project/drupal.git $NAME
cd $NAME
echo "Generating Docksal Config..."
fin config generate --docroot=.
echo "Starting Docksal..."
fin start
echo "Running Composer install..."
fin composer install
# D8 Install
fin drush --yes si \
--account-mail="[email protected]" \
--account-name="admin" \
--account-pass="admin" \
--db-url=mysql://root:root@db/default \
standard \
install_configure_form.enable_update_status_emails=NULL \
install_configure_form.enable_update_status_module=NULL
echo "Drupal has been installed with default username and password (admin/admin)"
echo "Generating a One Time Login Link..."
fin drush uli
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment