Skip to content
This repository has been archived by the owner on Feb 13, 2023. It is now read-only.

Commit

Permalink
Issue #704: Take root composer.json into account in docs on Drupal VM…
Browse files Browse the repository at this point in the history
… as a dependency
  • Loading branch information
oxyc committed Jun 6, 2016
1 parent e1779d9 commit 913be94
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions docs/other/drupalvm-composer-dependency.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ Add and configure the `config.yml` anywhere you like, in this example we place i
_Note: This will be the directory where Drupal VM looks for other local configuration files as well. Such as [`local.config.yml` and `Vagrantfile.local`](overriding-configurations.md)._

```
├── composer.json
├── config/
│ ├── config.yml
│ ├── drupal.make.yml
│ ├── local.config.yml
│ └── Vagrantfile.local
├── docroot/
Expand All @@ -29,6 +29,16 @@ _Note: This will be the directory where Drupal VM looks for other local configur
└── drupal-vm/
```

Change the build strategy to use your `composer.json` file by setting:

```yaml
build_composer_project: false
build_composer: true
drupal_composer_path: false
drupal_composer_install_dir: "/var/www/drupalvm"
drupal_core_path: "{{ drupal_composer_install_dir }}/docroot"
```
If you're using `pre_provision_scripts` or `post_provision_scripts` you also need to adjust their paths to take into account the new directory structure. The examples used in `default.config.yml` assume the files are located in the Drupal VM directory. If you use relative paths you need to the ascend the directory tree as far as the project root, but using the `config_dir` variable you get the absolute path of where you `config.yml` is located.

```yaml
Expand Down Expand Up @@ -66,7 +76,6 @@ Your project structure should now look like this:
├── composer.json
├── config/
│ ├── config.yml
│ ├── drupal.make.yml
│ ├── local.config.yml
│ └── Vagrantfile.local
├── docroot/
Expand Down Expand Up @@ -117,7 +126,6 @@ Your directory structure should now look like this:
```
├── Vagrantfile
├── config/
│ ├── drupal.make.yml
│ ├── config.yml
│ ├── local.config.yml
│ └── Vagrantfile.local
Expand Down

0 comments on commit 913be94

Please sign in to comment.