10 Steps to Install DDEV TYPO3 Solr Extension

Are you looking for a quick tutorial to install & configure DDEV TYPO3 Solr? DDEV is a docker based development environment and has the built-in ability to run TYPO3 on solr. In this guide, you will get step-by-step guide to install & configure DDEV + TYPO3 + Apache + TYPO3 Solr Extension.

Step 1. ddev composer require apache-solr-for-typo3/solr

Step 2. ddev typo3 extension:deactivate solr && ddev typo3 extension:activate solr

Step 3. nano .ddev/docker-compose.solr.yaml

 

version: '3.6'

services:
  solr:
    container_name: ddev-${DDEV_SITENAME}-solr
    image: typo3solr/ext-solr:10.0.1
    restart: "no"
    expose:
      - 8983
    labels:
      com.ddev.site-name: ${DDEV_SITENAME}
      com.ddev.approot: $DDEV_APPROOT
    environment:
      - VIRTUAL_HOST=$DDEV_HOSTNAME
      - HTTP_EXPOSE=8983
    volumes:
      - "./solr:/opt/solr/server/solr"
      # If you want your solr to persist over `ddev stop` and `ddev start` then uncomment the following line
      # If you uncomment it and want to flush your data you have to `ddev stop` and then
      # `docker volume rm ddev-<projectname>_solrdata` to destroy it.
      # - solr:/var/solr
  web:
    links:
      - solr

volumes:
  # solr is a persistent Docker volume for this project's solr data
  # the volume will be named ddev-<project>_solr
  solr:

 

Step 4. mkdir -p .ddev/solr && cp -r public/typo3conf/ext/solr/Resources/Private/Solr/* .ddev/solr

Step 5. ddev restart

Step 6. Backend > Sites > Site Management > Your Site: Solr Tab > Host = solr

Step 6. Backend > Sites > Site Management > Your Site: Languages tab > Corename = core_en

Step 7. Backend > Web > Template > Includes: Add "Search - Base Configuration (solr) + Search - Default Stylesheets (solr)"

Step 8. Flush all caches

Step 9. Backend > Info > Apache Solr: Check connection with Apache Solr server.

Step 10. Backend > Apache Solr > Index Queue: Add to Queue and Index now!

Step 11. Test-drive Solr Server at http://yourpoject.ddev.site:8983/solr

 

Tips: How to add Multiple Solr Cores into DDEV/Docker?

By default DDEV run with one core; If you want to add Multiple solr cores then you can configure with below.

Post a Comment

×
Captcha Code Can't read the image? Click here to refresh
  • user
    Eddy Settle February 6, 2023 at 12:43 pm
    To the t3planet.com admin, Keep the good content coming!

Got answer to the question you were looking for?