generated from ddev/ddev-drupal-solr
-
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
26 changed files
with
52 additions
and
19,873 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,20 @@ | ||
[![tests](https://github.com/drud/ddev-drupal9-solr/actions/workflows/tests.yml/badge.svg)](https://github.com/drud/ddev-drupal9-solr/actions/workflows/tests.yml) | ||
[![tests](https://github.com/drud/ddev-memcached/actions/workflows/tests.yml/badge.svg)](https://github.com/drud/ddev-memcached/actions/workflows/tests.yml) | ||
|
||
## What is this? | ||
|
||
This repository allows you to quickly install Apache Solr for Drupal 9 into a [Ddev](https://ddev.readthedocs.io) project using just `ddev service get drud/ddev-drupal9-solr`. | ||
This repository allows you to quickly install memcached into a [Ddev](https://ddev.readthedocs.io) project using just `ddev service get drud/ddev-memcached`. | ||
|
||
## Installation on Drupal 9 | ||
## Installation | ||
|
||
1.`ddev service get drud/ddev-drupal9-solr && ddev restart` | ||
2. You may need to install the relevant Drupal requirements: `ddev composer require drush/drush:* drupal/search_api_solr` | ||
3. Enable the Search API Solr Search Defaults module: `ddev drush en -y search_api_solr_defaults`. (If it can't be enabled due to the "article" content type not existing, you can just create a search_api_solr server manually.) | ||
4. Edit the enabled search_api server named `default_solr_server` at `admin/config/search/search-api/server/default_solr_server/edit` | ||
* set "Solr host" to `solr` | ||
* set "Solr core" name to "dev" | ||
* Under "Advanced server configuration" set the "solr.install.dir" to `/opt/solr` | ||
1.`ddev service get drud/ddev-memcached && ddev restart` | ||
5. `ddev restart` | ||
|
||
## Explanation | ||
|
||
This is the classic Drupal solr 8 recipe used for a long time by Drupal users and compatible with search_api_solr. | ||
This memcached recipe for [ddev](https://ddev.readthedocs.io) installs a [`.ddev/docker-compose.memcached.yaml`](docker-compose.memcached.yaml) using the memcached:1.5 docker image. | ||
|
||
* It installs a [`.ddev/docker-compose.solr.yaml`](docker-compose.solr.yaml) using the solr:8 docker image | ||
* A standard Drupal 9 solr configuration is included in [.ddev/solr/conf](.ddev/solr/conf) | ||
* 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`. | ||
## Interacting with Memcached | ||
|
||
## Interacting with Apache Solr | ||
|
||
* 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/`. | ||
* To access the Solr container from inside the web container use: `http://solr:8983/solr/` | ||
* 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. | ||
|
||
## Caveats | ||
* 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. | ||
* The Memcached instance will listen on TCP port 11211 (the Memcached default). | ||
* Configure your application to access Memcached on the host:port `memcached:11211`. | ||
* To reach the Memcached admin interface, run ddev ssh to connect to the web container, then use nc or telnet to connect to the Memcached container on port 11211, i.e. nc memcached 11211. You can then run commands such as `stats` to see usage information. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
# DDEV-Local memcached recipe file. | ||
# | ||
# To use this in your own project: | ||
# 1. Copy this file to your project's ".ddev" directory. | ||
# 2. Launch "ddev start". | ||
# 3. Configure the project to look for memcached at hostname "memcached" and | ||
# port 11211. | ||
# 4. Optional: adjust the 'command' line below to change CLI flags sent to | ||
# memcached. | ||
|
||
version: '3.6' | ||
|
||
services: | ||
# This is the service name used when running ddev commands accepting the | ||
# --service flag. | ||
memcached: | ||
# This is the name of the container. It is recommended to follow the same | ||
# name convention used in the main docker-compose.yml file. | ||
container_name: ddev-${DDEV_SITENAME}-memcached | ||
image: memcached:1.5 | ||
networks: [default, ddev_default] | ||
restart: "no" | ||
# memcached is available at this port inside the container. | ||
expose: | ||
- 11211 | ||
# These labels ensure this service is discoverable by ddev. | ||
labels: | ||
com.ddev.site-name: ${DDEV_SITENAME} | ||
com.ddev.approot: $DDEV_APPROOT | ||
|
||
# Arguments passed to the memcached binary. | ||
command: ["-m", "128"] | ||
|
||
volumes: | ||
- ".:/mnt/ddev_config" |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,7 @@ | ||
name: solr | ||
|
||
pre_install_actions: | ||
- "docker volume rm ddev-${DDEV_PROJECT}_solr 2>/dev/null || true" | ||
name: memcached | ||
|
||
# files and directories listed here are copied into .ddev | ||
files: | ||
- solr | ||
- docker-compose.solr.yaml | ||
- docker-compose.memcached.yaml | ||
|
||
post_install_actions: | ||
- chmod +x solr/docker-entrypoint-initdb.d/solr-configupdate.sh | ||
|
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.