![]() You can also log into box using 'vagrant ssh', which will take you directly to the Drupal codebase and allow you to run Drush commands on the site.įrom start to finish I can go from nothing to a fully installed Drupal site in around 10-15 minutes, although that depends on what speed your internet connection is. From here you can visit you Drupal site and start getting Drupal installed properly. Once complete you can visit (or whatever URL you have added into your Vagrant file) and see the DrupalVM dashboard. With all that set up you can now run 'vagrant up' and DrupalVM will provision your machine for you. Note: The inclusion of the specific version of Xdebug here is to get around an issue I had with PHPStorm not liking the newer version. # - xhprof # use `tideways` if you're installing PHP 7+ # Turn off all automatic installer features. ![]() # Allow easy configuration of the machine resources. # the config file need to be contained within this path.ĮNV = "#/web" # The absolute path to the root directory of the project. Note that in later versions of Vagrant this file is called Vagrantfile (without the capital F). Instead of a full copy of the DrupalVM VagrantFile we instead create a small proxy file that sets up the configuration directories and then loads in the VagrantFile from the DrupalVM directory.Ĭopy the following into your VagrantFile. The first thing we need to add to the project is a VagrantFile, which will allow Vagrant to function. This doesn't do a lot on it's own, so before we provision the machine we need to add some configuration files. composer require -dev geerlingguy/drupal-vm We do this as a 'dev' dependency as we don't need to be running DrupalVM in production. With that setup the next step is to require DrupalVM. Adding Drush at this point is usually a good idea. After this step you can require any other Drupal based modules or projects that you want. For more information on what is in the recommended composer file see my previous blog post on the subject. This will create your composer file and install the Drupal codebase along with a few other dependencies. composer create-project drupal/recommended-project drupal_vm_setup I normally run the Drupal recommended composer setup file so that I have a up to date Drupal codebase, so let's do that here. Start out with a Drupal site in a composer setup. I thought I would go through the steps involved in adding DrupalVM to your codebase as it's pretty simple and will get you up and running with a Drupal site in about 10 minutes. ![]() This is especially useful if something like Solr is involved as setting that up is a pain. When starting a new site project I normally add DrupalVM to the codebase so that I can get the site up and running quickly. I normally run it with Vagrant, but you can run it with Docker if you like. ![]() More than that, I find I have very few problems with running it. I like working with DrupalVM and I've worked with Ansible based Vagrant setups for years and so I'm very familiar with it's setup. ![]()
0 Comments
Leave a Reply. |