Skip to content

Instantly share code, notes, and snippets.

@dmitryd
Last active March 27, 2021 11:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dmitryd/69ce039148dbc758c561138ce182e28c to your computer and use it in GitHub Desktop.
Save dmitryd/69ce039148dbc758c561138ce182e28c to your computer and use it in GitHub Desktop.
Ddev yaml file for using solr in TYPO3
# To access Solr after it is installed:
# - 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 the web container use:
# http://solr:8983/solr/
version: '3.6'
services:
solr:
# Name of container using standard ddev convention
container_name: ddev-${DDEV_SITENAME}-solr
# The solr docker image is at https://hub.docker.com/r/typo3solr/ext-solr
image: typo3solr/ext-solr:11.0.3
restart: "no"
# Solr is served from this port inside the container.
ports:
- 8983
# These labels ensure this service is discoverable by ddev.
labels:
com.ddev.site-name: ${DDEV_SITENAME}
com.ddev.approot: $DDEV_APPROOT
environment:
# This defines the host name the service should be accessible from. This
# will be sitename.ddev.site.
- VIRTUAL_HOST=$DDEV_HOSTNAME
# HTTP_EXPOSE exposes http traffic from the container port 8983
# to the host port 8983 vid ddev-router reverse proxy.
- HTTP_EXPOSE=8983:8983
# HTTPS_EXPOSE exposes https traffic from the container port 8983
# to the host port 8984 vid ddev-router reverse proxy.
- HTTPS_EXPOSE=8984:8983
volumes:
# solr core *data* is stored on the 'solr' docker volume
# This mount is optional; without it your search index disappears
# each time the ddev project is stopped and started.
- solr:/var/solr
- ".:/mnt/ddev_config"
external_links:
- "ddev-router:${DDEV_SITENAME}.${DDEV_TLD}"
# This links the Solr service to the web service defined in the main
# docker-compose.yml, allowing applications running inside the web container to
# access the Solr service at http://solr:8983
web:
links:
- solr:solr
volumes:
# solr is a persistent Docker volume for solr data
# The persistent volume should have the same name as the service so it can be deleted
# when the project is deleted.
solr:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment