oh17l/draft-environment

Development environment for Draft Drupal.

Installs: 2 139

Dependents: 1

Suggesters: 0

Security: 0

Stars: 0

Watchers: 1

Forks: 4

Language:Ruby

Type:vm

2.6.6 2018-08-23 12:39 UTC

README

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

Docker

  • Docker
  • docker-compose

Vagrant

  • Vagrant
  • VirtualBox

Vagrant plugins (will be automatically installed)

Vagrant Host Manager

Manages host and/or guest hosts files. Draft is configured to create a hostname.test DNS record on a host machine.

vagrant-vbguest

Automatically installs the host's VirtualBox Guest Additions on the guest system.

Vagrant WinNFSd (WINDOWS only)

Dramatically increases disk IO on Windows by adding NFS support.

How to

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

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

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

  4. Create and configure guest machine:

    $ docker-compose up -d
    

    or

    $ vagrant up
    
  5. Override any variable used in any Ansible role by including it in the vm-settings.yml. For details see default.vm-settings.yml

    Here's the list of used roles and available variables (and their default values):

    Some of those variables are already overridden. Find them here.

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

  7. File vm-settings.yml is project-specific, not a machine specific. Configuration can be overridden in vm-settings.local.yml (and this file must not be committed)

  8. Run vagrant ssh. Project is located in /var/www/draft by default (see default.vm-settings.yml)

Documentation

Everybody loves documentation. We do too! Check this out.

Changelog

Changelog can be found here CHANGELOG.md

Upgrade

Upgrade instructions can be found here UPGRADE.md