Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,6 @@ web/sites/*/files

# Ignore files generated by PhpStorm
.idea

# Ignore files generated by Vagrant
.vagrant
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,18 @@ With using [the "Composer Generate" drush extension](https://www.drupal.org/proj
you can now generate a basic `composer.json` file from an existing project. Note
that the generated `composer.json` might differ from this project's file.

## Local development

This project have added [Drupal VM](https://www.drupalvm.com/) as a development dependency with the config file located in `./drupal-vm/`.
To start the environment you need to:

```
cp Vagrantfile.dist Vagrantfile
cp drupal-vm/config.yml.dist drupal-vm/config.yml
vagrant up
```

Refer to the [Drupal VM documentation](http://docs.drupalvm.com/en/latest/) for any customizations.

## FAQ

Expand Down
4 changes: 4 additions & 0 deletions Vagrantfile.dist
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
ENV['DRUPALVM_PROJECT_ROOT'] = "#{__dir__}"
ENV['DRUPALVM_CONFIG_DIR'] = "drupal-vm"
ENV['DRUPALVM_DIR'] = "vendor/geerlingguy/drupal-vm"
load "#{__dir__}/#{ENV['DRUPALVM_DIR']}/Vagrantfile"
1 change: 1 addition & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
"require-dev": {
"behat/mink": "~1.7",
"behat/mink-goutte-driver": "~1.2",
"geerlingguy/drupal-vm": "~3.5",
"jcalderonzumba/gastonjs": "~1.0.2",
"jcalderonzumba/mink-phantomjs-driver": "~0.3.1",
"mikey179/vfsStream": "~1.2",
Expand Down
22 changes: 22 additions & 0 deletions drupal-vm/config.yml.dist
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Technically, you would only need to include a few variables that need overriding (e.g. vagrant_synced_folders), instead of the entire config.yml file.

This way maintenance is a lot easier over time, since you would just use Drupal VM's defaults (which should always work with the latest and n-1 releases of Drupal core).

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @geerlingguy! I just pushed a minimal version of the config file.

vagrant_hostname: drupalvm.dev
vagrant_machine_name: drupalvm
vagrant_ip: 192.168.88.88

vagrant_synced_folders:
- local_path: .
destination: /var/www/drupalvm
type: nfs
create: true

build_makefile: false
build_composer: true
build_composer_project: false

drupal_composer_path: false
drupal_composer_install_dir: "/var/www/drupalvm"
drupal_composer_dependencies:
drupal_core_path: "{{ drupal_composer_install_dir }}/web"
drupal_enable_modules: []

install_site: true