Skip to content

Crazylord/draft-environment

 
 

Repository files navigation

Draft Environment

Build Status

This is Vagrant-based development environment for Drupal projects. This project is a part of a Draft Drupal project template.

Prerequisites

  • PHP/Composer
  • Vagrant
  • VirtualBox

Vagrant plugins (highly recommended)

Vagrant Host Manager

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

Vagrant WinNFSd (WINDOWS only)

Dramatically increases disk IO on Windows by adding NFS support.

Install plugin:

$ vagrant plugin install vagrant-winnfsd

Usage

  1. Install recommended Vagrant plugins

  2. Add post-install-cmd and post-update-cmd events handler Lemberg\\Draft\\Environment\\ScriptHandler::setUp to the scripts property of the root composer.json file. Resulting file might look like this:

    "scripts": {
        "post-install-cmd": [
            "Lemberg\\Draft\\Environment\\ScriptHandler::setUp"
        ],
        "post-update-cmd": [
            "Lemberg\\Draft\\Environment\\ScriptHandler::setUp"
        ]
    },
  3. Add Draft to the project (as a dev dependency):

    $ composer require --dev lemberg/draft-environment
    
  4. 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.yml manually.

  5. Create and configure guest machine:

    $ vagrant up
    
  6. Commit Vagrantfile and vm-settings.yml to lock the VM state

About

Vagrant-based environment setup for Draft Drupal

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Ruby 55.4%
  • PHP 27.2%
  • Shell 17.4%