docksal / service-solr

Apache Solr service images for Docksal
https://docksal.io
MIT License
0 stars 8 forks source link

Can not set name of solr in case use user config. #19

Open ffw-chuyen-luu opened 3 years ago

ffw-chuyen-luu commented 3 years ago

Hi @lmakarov, I tried to setup drupal 8 with search_api_solr-4.x, with added solr service under services in docksal.yml:

  solr:
    hostname: solr
    image: docksal/solr:7.5-2.0
    environment:
      - SOLR_DEFAULT_CONFIG_SET=solr7
    volumes:
      - ${PROJECT_ROOT}/.docksal/etc/solr/conf:/var/www/.docksal/etc/solr/conf:ro
    labels:
      io.docksal.virtual-host: solr.${VIRTUAL_HOST},solr.${VIRTUAL_HOST}.*
      io.docksal.virtual-port: '8983'

my solr config added to .docksal/etc/solr but I got solr core named user-owned, not solr7 I was set up. And I see here is cause of issue https://github.com/docksal/service-solr/blob/develop/scripts/docksal-preinit#L5, SOLR_DEFAULT_CONFIG_SET is hard code in case use user config.