Setup DrupalVM quickly
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
LICENSE
README.md
setup-drupalvm.sh

README.md

DrupalVM configuration script

This simple bash script lets you get started with DrupalVM quickly for new projects. It downloads DrupalVM in the current directory and sets up a config.yml based on quick questions. The target is to have an opinionated way to run DrupalVM quickly and efficiently.

Usage

Download the script to your working directory or you may place it in your bin directory to run it from anywhere.

$ wget https://raw.githubusercontent.com/axelerant/setup-drupalvm/master/setup-drupalvm.sh
$ chmod +x setup-drupalvm.sh

Run the script directly. You may symlink it to one of the directories in your PATH to run it from anywhere. It always works in the current directory.

WARNING: This script immediately clears specific DrupalVM related files in your current directory WITHOUT any confirmations. It only checks for filenames like master.zip, Vagrantfile, etc... Please be careful before running the script.

$ ./setup-drupalvm.sh

You should see an output like this:

Downloading DrupalVM...
Extracting DrupalVM and preparing the directory...
Enter the box: geerlingguy/ubuntu1604
Enter the machine name: drupalvm
Enter the domain name for the host: drupalvm.dev
Enter the domain name to access the root: drupalvmroot.dev
Enter the IP: 0.0.0.0
Enter the relative path to the Drupal installation: drupalvm/docroot
Enter the PHP version (5.6 or 7.0): 7.0

You may specify any valid values for the above questions. If you want to run PHP 5.6 for any reason, make sure you select geerlingguy/ubuntu1404 for the box.

If you are using the vagrant-auto_network plugin, you may use the IP 0.0.0.0 as shown above to let the plugin allocate an IP. When used along with vagrant-hostmanager plugin, it will add entries to your host's /etc/hosts (or equivalent) file. Another highly useful plugin is vagrant-cachier to cache OS and composer packages across boxes.

After running the script, you may edit the default.config.yml or config.yml as you see fit to further customize DrupalVM. Refer to DrupalVM's documentation for more details.

This script was tested with DrupalVM 4.1.0 and should work with DrupalVM 4.x.