ddev solr image config

version: '3.6'

services:
  solr:
    container_name: ddev-${DDEV_SITENAME}-solr
    image: solr:8
    restart: "no"
    expose:
      - 8983
    labels:
      com.ddev.site-name: ${DDEV_SITENAME}
      com.ddev.approot: $DDEV_APPROOT
    environment:
      - VIRTUAL_HOST=$DDEV_HOSTNAME
      - SOLR_HEAP=2G
      - HTTP_EXPOSE=8983:8983
    volumes:
      - solr:/var/solr
      - ./solr:/solr-conf
      - ".:/mnt/ddev_config"
      - "./solr/docker-entrypoint-initdb.d:/docker-entrypoint-initdb.d"
    entrypoint: [ "sh", "-c", "docker-entrypoint.sh solr-precreate drupal /solr-conf" ]
    external_links:
      - "ddev-router:${DDEV_SITENAME}.${DDEV_TLD}"
    healthcheck:
      test: ["CMD-SHELL", "curl --fail -s localhost:8983/solr/"]

volumes:
  solr:
    name: "ddev-${DDEV_SITENAME}_solr"