You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Feb 13, 2023. It is now read-only.
Copy file name to clipboardExpand all lines: docs/deployment/composer.md
+6-2Lines changed: 6 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -2,11 +2,14 @@ Drupal VM is configured to use [Drush make](drush-make.md) by default but suppor
2
2
3
3
## Using composer.json
4
4
5
-
Add a `drupal.composer.json` next to your `config.yml` and switch the build system by setting `build_makefile: false` and `build_composer: true` in your `config.yml`. By default Drupal VM expects the Drupal code to be installed within a `docroot/` directory, if you use a different webroot directory, you need to adjust `drupal_core_path`.
5
+
1. Copy `example.drupal.composer.json` to `drupal.composer.json` and modify it to your liking.
6
+
2. Switch the build system by setting `build_makefile: false` and `build_composer: true` in your `config.yml`.
7
+
3. Configure `drupal_core_path` to point to the webroot directory: `drupal_core_path: {{ drupal_composer_install_dir }}/docroot`
_The file set in `drupal_composer_path` (which defaults to `drupal.composer.json`) will be copied from your host computer into the VM's `drupal_composer_install_dir` and renamed `composer.json`. If you already have a composer.json within that directory, you can set `drupal_composer_path: false`._
## Creating a project from a composer package: `composer create-project`
@@ -29,7 +33,7 @@ There's a couple of things you need to configure in your `config.yml`:
29
33
- Switch the build system by setting `build_makefile: false`, `build_composer: false` and `build_composer_project: true`.
30
34
- Configure the composer package in `drupal_composer_project_package`.
31
35
- Additionally you can adjust the create-project CLI options in `drupal_composer_project_options` as well as add additional dependencies in `drupal_composer_dependencies`.
32
-
- Ensure that the webroot configured in the composer package matches the one set in `drupal_core_path`. The default is `docroot/`.
36
+
- Ensure that the webroot configured in the composer package matches the one set in `drupal_core_path`.
33
37
34
38
With [drupal-composer/drupal-project](https://github.com/drupal-composer/drupal-project) as an example your `config.yml` overrides would be:
0 commit comments