This is Vagrant-based development environment for Drupal projects. This project is a part of a Draft Drupal project template.
- PHP/Composer
- Vagrant
- VirtualBox
Manages host and/or guest hosts files. Draft is configured to create a hostname.test DNS record on a host machine.
Install plugin:
$ vagrant plugin install vagrant-hostmanager
Dramatically increases disk IO on Windows by adding NFS support.
Install plugin:
$ vagrant plugin install vagrant-winnfsd
-
Install recommended Vagrant plugins
-
Add
post-install-cmdandpost-update-cmdevents handlerLemberg\\Draft\\Environment\\ScriptHandler::setUpto thescriptsproperty of the rootcomposer.jsonfile. Resulting file might look like this:"scripts": { "post-install-cmd": [ "Lemberg\\Draft\\Environment\\ScriptHandler::setUp" ], "post-update-cmd": [ "Lemberg\\Draft\\Environment\\ScriptHandler::setUp" ] },
-
Add Draft to the project (as a dev dependency):
$ composer require --dev lemberg/draft-environment -
Configure guest machine by answering installer's questions. At the moment, project name (hostname) is the only setting that can be set interactively. More to come. Adjust other settings by editing
vm-settings.ymlmanually. -
Create and configure guest machine:
$ vagrant up -
Commit
Vagrantfileandvm-settings.ymlto lock the VM state