A Solr 6 container for local development and production
10K+

Flight Deck Solr is a minimalist Solr container for Drupal sites on Kubernetes and Docker. You can use it both for local development and production.
Features:
There are several tags available for this container, each with different Solr and Drupal module support:
| Tags | Solr Version | Search API | Custom cores |
|---|---|---|---|
| latest | 8.6 | Yes | Yes |
| x.y.z | 8.6 | Yes | Yes |
Instead of a large number of environment variables, this container relies on a file to perform all runtime configuration, flightdeck-solr.yml. Inside the file, create following:
---
flightdeck_solr: {}
All configuration is done as items under the flightdeck_solr variable. See the following sections for details as to particular configurations.
You can provide this file in one of three ways to the container:
/config/solr/flightdeck-solr.yml inside the container using a bind mount, configmap, or secret.FLIGHTDECK_CONFIG_FILE environment variable to the path of the file.flightdeck-solr.yml as base64 and assign the result to the FLIGHTDECK_CONFIG environment variable.---
flightdeck_solr:
port: 8983
cores: []
Where:
8983.This container supports multiple cores by defining an item under the flightdeck_solr.cores item:
---
flightdeck_solr:
port: 8983
cores:
- name: "my_custom_core"
type: "custom"
confDir: "/solr-conf"
dataDir: "/solr-data"
- name: "my_other_core"
type: "custom"
confDir: "/other-conf"
dataDir: "/other-data"
Each item has the following variables:
custom or empty.custom cores./data/<name_of_the_core>.In some cases, you may wish to pass your solr core configs inline inside of flightdeck-solr.yml rather than as a mounted directory in the container. In that case, you can define the conf list.
Each item under the list represents a file in the core configuration directory:
---
flightdeck_solr:
port: 8983
cores:
- name: "my_custom_core"
type: "custom"
conf:
- name: "solrconfig.xml"
content: |
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE config [
<!ENTITY extra SYSTEM "solrconfig_extra.xml">
<!ENTITY index SYSTEM "solrconfig_index.xml">
]>
Where:
A drawback of inline configuration is that you need to escape it work in YAML. This can be frustrating an difficult. Instead, is recommended to base64 encode the content of the file, and use the content_base64 key instead:
---
flightdeck_solr:
port: 8983
cores:
- name: "my_custom_core"
type: "custom"
conf:
- name: "solrconfig.xml"
content_base64: |
PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiID8+Cgo8IURPQ1RZUEUgY29uZmln
IFsKICAgPCFFTlRJVFkgZXh0cmEgU1lTVEVNICJzb2xyY29uZmlnX2V4dHJhLnhtbCI+CiAgIDwh
RU5USVRZIGluZGV4IFNZU1RFTSAic29scmNvbmZpZ19pbmRleC54bWwiPgpdPgo=
Use the ten7.flightdeck_cluster role on Ansible Galaxy to deploy Solr as a statefulset:
flightdeck_cluster:
namespace: "search"
configMaps:
- name: "solr_config"
files:
- name: "flightdeck-solr.yml"
content: |
flightdeck_solr:
cores:
- name: "my_sapi_docker"
type: "search_api_solr"
solr:
configMaps:
- name: "solr_config"
path: "/config"
Create the flightdeck-solr.yml file relative to your docker-compose.yml. Define the solr service mounting the file as a volume:
version: '3'
services:
solr:
image: ten7/flight-deck-solr:6.6
volumes:
- ./flightdeck-solr.yml:/config/flightdeck-solr.yml
ports:
- "8003:8983"
This container is part of the Flight Deck library of containers for Drupal local development and production workloads on Docker, Swarm, and Kubernetes.
Flight Deck is used and supported by TEN7.
If you need to get verbose output from the entrypoint, set flightdeck_debug to true or yes in the config file.
---
flightdeck_debug: yes
This container uses Ansible to perform start-up tasks. To get even more verbose output from the start up scripts, set the ANSIBLE_VERBOSITY environment variable to 4.
If the container will not start due to a failure of the entrypoint, set the FLIGHTDECK_SKIP_ENTRYPOINT environment variable to true or 1, then restart the container.
Flight Deck is licensed under GPLv3. See LICENSE for the complete language.
Content type
Image
Digest
Size
232.1 MB
Last updated
over 4 years ago
docker pull ten7/flightdeck-solr-6