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

Commit 913be94

Browse files
committed
Issue #704: Take root composer.json into account in docs on Drupal VM as a dependency
1 parent e1779d9 commit 913be94

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

docs/other/drupalvm-composer-dependency.md

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ Add and configure the `config.yml` anywhere you like, in this example we place i
1515
_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)._
1616

1717
```
18+
├── composer.json
1819
├── config/
1920
│ ├── config.yml
20-
│ ├── drupal.make.yml
2121
│ ├── local.config.yml
2222
│ └── Vagrantfile.local
2323
├── docroot/
@@ -29,6 +29,16 @@ _Note: This will be the directory where Drupal VM looks for other local configur
2929
└── drupal-vm/
3030
```
3131

32+
Change the build strategy to use your `composer.json` file by setting:
33+
34+
```yaml
35+
build_composer_project: false
36+
build_composer: true
37+
drupal_composer_path: false
38+
drupal_composer_install_dir: "/var/www/drupalvm"
39+
drupal_core_path: "{{ drupal_composer_install_dir }}/docroot"
40+
```
41+
3242
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.
3343

3444
```yaml
@@ -66,7 +76,6 @@ Your project structure should now look like this:
6676
├── composer.json
6777
├── config/
6878
│ ├── config.yml
69-
│ ├── drupal.make.yml
7079
│ ├── local.config.yml
7180
│ └── Vagrantfile.local
7281
├── docroot/
@@ -117,7 +126,6 @@ Your directory structure should now look like this:
117126
```
118127
├── Vagrantfile
119128
├── config/
120-
│ ├── drupal.make.yml
121129
│ ├── config.yml
122130
│ ├── local.config.yml
123131
│ └── Vagrantfile.local

0 commit comments

Comments
 (0)