Skip to content
This repository was archived by the owner on Nov 3, 2024. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions docker-compose-services/solr/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ development environment is to just stay with the default.
Once up and running you can access Solr's UI within your browser by opening
`http://<projectname>.ddev.site:8983`. For example, if the project is named
"myproject" the hostname will be `http://myproject.ddev.site:8983`. To access
the Solr container from the web container use `ddev-<project>-solr:8983`.
the Solr container from the web container use `solr:8983`.

Solr Cloud depends on Zookeeper to share configurations between the Solr nodes.
Therefore this service starts a single Zookeeper server on port 2181, too. It is
Expand Down Expand Up @@ -71,9 +71,9 @@ Note: If you choose to run Solr Cloud using a single node in standalone mode,

1. Copy `docker-compose.solr.yaml` **or** `docker-compose.solr-standalone.yaml` to your project's `.ddev` directory.
2. Copy the `solr` folder (`including security.json`) to your project's `.ddev` directory.
3. Configure your application to connect Solr at `http://ddev-<project>-solr:8983`.
3. Configure your application to connect Solr at `http://solr:8983`.
4. If you want to use Solr's APIs that require a trusted context configure Basic Auth with username `solr` and password `SolrRocks`.
5. (Re-)start your DDEV project.
5. `ddev restart`.

## Solarium

Expand All @@ -93,7 +93,7 @@ $config = [
'endpoint' => [
'localhost' => [
// Replace <project> by your project's name:
'host' => 'ddev-<project>-solr',
'host' => 'solr',
'port' => 8983,
'path' => '/',
// Use your collection name here:
Expand All @@ -112,7 +112,7 @@ $client = new Solarium\Client($adapter, $eventDispatcher, $config);
* Enable the `search_api_solr_admin` module. (This sub-module is included in Search API Solr >= 4.2.1)
* Create a search server using the Solr backend and select `Solr Cloud with Basic Auth` as connector:
* HTTP protocol: `http`
* Solr node: `ddev-<project>-solr` (Replace <project> by your project's name.)
* Solr node: `solr`
* Solr port: `8983`
* Solr path: `/`
* Default Solr collection: `techproducts` (You can define any name here. The collection will be created automatically.)
Expand All @@ -124,7 +124,7 @@ $client = new Solarium\Client($adapter, $eventDispatcher, $config);

### Drupal and Search API Solr 4.1 and older

It is highly recommended to upgrade to the 4.2 version. But if you're required
Please upgrade to the 4.2+ versions. If you're required
to use an older versions of the Search API Solr module you have to deploy the
configset manually and create a collection using this configset afterwards.
Therefore you need to use the `Download config.zip` function of Search API Solr.
Expand Down
12 changes: 7 additions & 5 deletions docker-compose-services/solr/docker-compose.solr-standalone.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# DDev Solr Cloud service file.
#
# This is a variation of docker-compose.solr.yaml that only creates one Solr node and runs a single zookeeper in
# standalone mode. This setup is not recommended for a production environment but requires less ressources in a
# standalone mode. This setup is not recommended for a production environment but requires less resources in a
# development environment.
#
# To access Solr after it is installed:
Expand All @@ -10,7 +10,7 @@
# For example, if the project is named "myproject" the hostname will be:
# http://myproject.ddev.site:8983
# - To access the Solr container from the web container use:
# ddev-<project>-solr:8983
# solr:8983
#
# To use this in your own project:
# 1. Copy this file and the solr (including security.json) directory to your project's ".ddev" directory.
Expand Down Expand Up @@ -50,7 +50,7 @@ services:
command: bash -c "docker-entrypoint.sh solr zk cp file:/mnt/ddev_config/solr/security.json zk:/security.json && exec solr-foreground"

zoo:
image: bitnami/zookeeper:3.7
image: zookeeper:3.7
container_name: ddev-${DDEV_SITENAME}-zoo
hostname: ddev-${DDEV_SITENAME}-zoo
expose:
Expand All @@ -62,12 +62,13 @@ services:
# The pre-trained OpenNLP models require a much bigger buffer.
JVMFLAGS: -Djute.maxbuffer=50000000
ZOO_MY_ID: 1
ZOO_SERVERS: server.1=ddev-${DDEV_SITENAME}-zoo1:2888:3888
ZOO_SERVERS: server.1=ddev-${DDEV_SITENAME}-zoo:2888:3888
ZOO_4LW_COMMANDS_WHITELIST: mntr, conf, ruok
ALLOW_ANONYMOUS_LOGIN: "yes"
volumes:
- .:/mnt/ddev_config
- zoo:/bitnami/zookeeper
- zoo:/data
- zoolog:/datalog

# This links the Solr service to the web service defined in the main
# docker-compose.yml, allowing applications running inside the web container to
Expand All @@ -79,3 +80,4 @@ services:
volumes:
solr:
zoo:
zoolog:
6 changes: 4 additions & 2 deletions docker-compose-services/solr/docker-compose.solr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ services:
- solr3:/var/solr

zoo:
image: bitnami/zookeeper:3.7
image: zookeeper:3.7
container_name: ddev-${DDEV_SITENAME}-zoo
hostname: ddev-${DDEV_SITENAME}-zoo
expose:
Expand All @@ -107,7 +107,8 @@ services:
ALLOW_ANONYMOUS_LOGIN: "yes"
volumes:
- .:/mnt/ddev_config
- zoo:/bitnami/zookeeper
- zoo:/data
- zoolog:/datalog

# This links the Solr service to the web service defined in the main
# docker-compose.yml, allowing applications running inside the web container to
Expand All @@ -121,3 +122,4 @@ volumes:
solr2:
solr3:
zoo:
zoolog: