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

Commit 8562826

Browse files
committed
Merge pull request #706 from oxyc/docs-704-1
Docs for 3.1.0
2 parents d772604 + 913be94 commit 8562826

File tree

5 files changed

+39
-24
lines changed

5 files changed

+39
-24
lines changed

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,8 @@ Notes:
8383
4. Open Terminal, `cd` to this directory (containing the `Vagrantfile` and this README file).
8484
5. Type in `vagrant up`, and let Vagrant do its magic.
8585

86+
Once the process is complete, you will have a Drupal codebase available inside the `drupal/` directory of the project.
87+
8688
Note: *If there are any errors during the course of running `vagrant up`, and it drops you back to your command prompt, just run `vagrant provision` to continue building the VM from where you left off. If there are still errors after doing this a few times, post an issue to this project's issue queue on GitHub with the error.*
8789

8890
### 3 - Configure your host machine to access the VM.

docs/deployment/composer.md

Lines changed: 10 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -3,23 +3,23 @@ Drupal VM is configured to use `composer create-project` to build a Drupal 8 cod
33
## Using composer.json
44

55
1. Copy `example.drupal.composer.json` to `drupal.composer.json` and modify it to your liking.
6-
2. Use the Composer build system by setting `build_composer: true` in your `config.yml` (make sure `build_makefile` is set to `false`).
6+
2. Use the Composer build system by setting `build_composer: true` in your `config.yml` (make sure `build_makefile` and `build_composer_project` are set to `false`).
77
3. Configure `drupal_core_path` to point to the webroot directory: `drupal_core_path: {{ drupal_composer_install_dir }}/docroot`
88

99
```yaml
10-
build_makefile: false
10+
build_composer_project: false
1111
build_composer: true
1212
drupal_core_path: "{{ drupal_composer_install_dir }}/docroot"
1313
```
1414
15-
_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`._
15+
_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, set `drupal_composer_path: false`._
1616

1717
## Using Composer when [Drupal VM is a composer dependency itself](../other/drupalvm-composer-dependency.md)
1818

19-
In the scenario where you already have an existing `composer.json` in the root of your project, follow the usual steps for installing with a composer.json but instead of creating a `drupal.composer.json` file, disable the transfering of the file by setting `drupal_composer_path` to `false`, and change `drupal_composer_install_dir` to point to the the directory where it will be located. If `drupal_composer_path` is not truthy, Drupal VM assumes it already exists.
19+
In the scenario where you already have an existing `composer.json` in the root of your project, follow the usual steps for installing with a composer.json but instead of creating a `drupal.composer.json` file, disable the transfering of the file by setting `drupal_composer_path: false`, and change `drupal_composer_install_dir` to point to the the directory where it will be located. If `drupal_composer_path` is not truthy, Drupal VM assumes it already exists.
2020

2121
```yaml
22-
build_makefile: false
22+
build_composer_project: false
2323
build_composer: true
2424
drupal_composer_path: false
2525
drupal_composer_install_dir: "/var/www/drupalvm"
@@ -33,22 +33,14 @@ This is the default Drupal VM build configuration, set up by the following setti
3333
- Composer will build the project if `build_composer_project` is `true`, and `build_makefile` and `build_composer` are both `false`.
3434
- The Composer package is defined by `drupal_composer_project_package`.
3535
- Adjust the create-project CLI options in `drupal_composer_project_options` as well as add additional dependencies in `drupal_composer_dependencies`.
36-
- Ensure that the webroot configured in the Composer package matches the one set in `drupal_core_path`.
36+
- Ensure that the webroot configured in the Composer package matches the one set in `drupal_core_path`. The default is set to `web/`.
3737

38-
With [drupal-composer/drupal-project](https://github.com/drupal-composer/drupal-project) as an example your `config.yml` settings would be:
38+
With [acquia/lightning-project](https://github.com/acquia/lightning-project) as an example your `config.yml` settings would be:
3939

4040
```yaml
41-
build_makefile: false
42-
build_composer: false
43-
build_composer_project: true
44-
45-
drupal_composer_project_package: "drupal-composer/drupal-project:8.x-dev"
46-
# Added `--no-dev` to avoid installing development dependencies.
47-
drupal_composer_project_options: "--prefer-dist --stability dev --no-interaction --no-dev"
48-
drupal_composer_dependencies:
49-
- "drupal/devel:8.*"
50-
51-
drupal_core_path: "{{ drupal_composer_install_dir }}/web"
41+
drupal_composer_project_package: "acquia/lightning-project:^8.1.0"
42+
drupal_composer_project_options: "--prefer-dist --stability rc --no-interaction"
43+
drupal_core_path: "{{ drupal_composer_install_dir }}/docroot"
5244
```
5345

5446
## Improving composer build performance

docs/deployment/drush-make.md

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,18 @@
1-
Drupal VM is configured to use Composer by default to build a Drupal site on the VM inside `/var/www/drupalvm/drupal` (in a folder that's synced to your local machine, so you can work with the Drupal codebase either locally or inside the VM).
1+
Drupal VM is configured to use Composer by default to build a Drupal site on the VM inside `/var/www/drupalvm/drupal/web` (in a folder that's synced to your local machine, so you can work with the Drupal codebase either locally or inside the VM).
22

3-
If you want to build a Drupal site using a [Drush make file](http://www.drush.org/en/master/make/) instead, you can either use the `example.drupal.make.yml` file as a base, or use your own Drush make file: just place it or symlink it into the root of the Drupal VM folder with the filename `drupal.make.yml`. You can also set a separate path to the makefile using the `drush_makefile_path` variable.
3+
If you want to build a Drupal site using a [Drush make file](http://www.drush.org/en/master/make/) instead, set `build_composer_project: false`, `build_makefile: true` and either use the `example.drupal.make.yml` file as a base, or use your own Drush make file: just place it or symlink it into the root of the Drupal VM folder with the filename `drupal.make.yml`. You can also set a separate path to the makefile using the `drush_makefile_path` variable.
4+
5+
```yaml
6+
build_composer_project: false
7+
build_makefile: true
8+
```
49
510
Have a look at the defaults in `default.config.yml` and tweak the settings as you'd like in your `config.yml`, then run `vagrant up` as in the Quick Start Guide. Within a few minutes, you should have your site running and available at the `drupal_domain` configured in `config.yml`, falling back to the default `http://drupalvm.dev` set in `default.config.yml`.
11+
12+
With the default settings the Drupal site will be built on the VM inside `/var/www/drupalvm/drupal/web` but the `web/` subdirectory is only required for `composer` based projects and you can simplify this directory structure by setting `drupal_core_path` to `/var/www/drupalvm/drupal`.
13+
14+
```yaml
15+
build_composer_project: false
16+
build_makefile: true
17+
drush_core_path: "/var/www/drupalvm/drupal"
18+
```

docs/deployment/local-codebase.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ Set all the `build_` variables and `install_site` to `false`:
1818
```yaml
1919
build_makefile: false
2020
build_composer: false
21-
build_composer_project: true
21+
build_composer_project: false
2222
...
2323
install_site: false
2424
```

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)