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
Copy file name to clipboardExpand all lines: README.md
+19-6
Original file line number
Diff line number
Diff line change
@@ -2,9 +2,9 @@
2
2
3
3
## What is this?
4
4
5
-
This repository allows you to quickly install Apache Solr for Drupal 9 into a [Ddev](https://ddev.readthedocs.io) project using just `ddev get drud/ddev-drupal9-solr`. It follows the [Setting up Solr (single core) - the classic way](https://git.drupalcode.org/project/search_api_solr/-/blob/4.x/README.md#setting-up-solr-single-core-the-classic-way) recipe.
5
+
This repository allows you to quickly install Apache Solr for Drupal 9+ into a [Ddev](https://ddev.readthedocs.io) project using just `ddev get drud/ddev-drupal9-solr`. It follows the [Setting up Solr (single core) - the classic way](https://git.drupalcode.org/project/search_api_solr/-/blob/4.x/README.md#setting-up-solr-single-core-the-classic-way) recipe.
6
6
7
-
## Installation on Drupal 9
7
+
## Installation on Drupal 9+
8
8
9
9
1.`ddev get drud/ddev-drupal9-solr && ddev restart`
10
10
1. You may need to install the relevant Drupal requirements: `ddev composer require drush/drush:* drupal/search_api_solr`
@@ -21,19 +21,32 @@ This repository allows you to quickly install Apache Solr for Drupal 9 into a [D
21
21
22
22
## Explanation
23
23
24
-
This is the classic Drupal solr:8recipe used for a long time by Drupal users and compatible with search_api_solr.
24
+
This is the classic Drupal `solr:8` image recipe used for a long time by Drupal users and compatible with `search_api_solr`.
25
25
26
26
* It installs a [`.ddev/docker-compose.solr.yaml`](docker-compose.solr.yaml) using the solr:8 docker image.
27
-
* A standard Drupal 9 solr configuration is included in [.ddev/solr/conf](solr/conf).
28
-
* A [.ddev/docker-entrypoint-initdb.d/solr-configupdate.sh](solr/docker-entrypoint-initdb.d/solr-configupdate.sh) is included and mounted into the solr container so that you can change solr config in .ddev/solr/conf with just a `ddev restart`.
27
+
* A standard Drupal 9+ Solr configuration is included in [.ddev/solr/conf](solr/conf).
28
+
* A [.ddev/docker-entrypoint-initdb.d/solr-configupdate.sh](solr/docker-entrypoint-initdb.d/solr-configupdate.sh) is included and mounted into the Solr container so that you can change Solr config in `.ddev/solr/conf` with just a `ddev restart`.
29
29
30
30
## Interacting with Apache Solr
31
31
32
32
* The Solr admin interface will be accessible at: `http://<projectname>.ddev.site:8983/solr/` For example, if the project is named `myproject` the hostname will be: `http://myproject.ddev.site:8983/solr/`.
33
33
* To access the Solr container from inside the web container use: `http://solr:8983/solr/`
34
34
* A Solr core is automatically created by default with the name "dev"; it can be accessed (from inside the web container) at the URL: `http://solr:8983/solr/dev` or from the host at `http://<projectname>.ddev.site:8983/solr/#/~cores/dev`. You can obviously create other cores to meet your needs.
35
35
36
+
## Alternate Core Name
37
+
38
+
If you want to use a core name other than the default "dev", add a `.ddev/docker-compose.solr-env.yaml` with these contents, using the core name you want to use:
39
+
```
40
+
services:
41
+
solr:
42
+
environment:
43
+
- SOLR_CORENAME=somecorename
44
+
```
45
+
1. Remove the #ddev-generated at the top of the file.
46
+
2. Change SOLR_CORE environment variable in the `environment:` section.
47
+
3. Change your Drupal configuration to use the new core.
48
+
36
49
## Caveats
37
-
* This recipe won't work with versions of solr before solr:8, and Acquia and Pantheon.io hosting require versions from 3 to 7. You'll want to see the [contributed recipes](https://github.com/drud/ddev-contrib) for older versions of solr.
50
+
* This recipe won't work with versions of Solr before `solr:8`, and Acquia and Pantheon.io hosting require versions from 3 to 7. You'll want to see the [contributed recipes](https://github.com/drud/ddev-contrib) for older versions of solr.
0 commit comments