solr6: image: alfresco/alfresco-search-services:1.4.0 mem_limit: 2g environment: #Solr needs to know how to register itself with Alfresco - SOLR_ALFRESCO_HOST=alfresco - SOLR_ALFRESCO_PORT=7080 #Alfresco needs to know how to call solr - SOLR_SOLR_HOST=solr6 - SOLR_SOLR_PORT=8983 #Create the default alfresco and archive cores - SOLR_CREATE_ALFRESCO_DEFAULTS=alfresco,archive #HTTP by default - ALFRESCO_SECURE_COMMS=none - "SOLR_JAVA_MEM=-Xms2g -Xmx2g" ports: - 8083:8983 #Browser port
Port 8983 is default port for alfresco-search-service and it is exposed within the image. So even if you change the 'ports' configuration in docker-compose.yml, you would notice that solr6 still runs on 8983 port and alfresco will fail to connect to solr6 if 'solr.port' value is updated to anything else. Below log indicates the port for solr6 at startup.
INFO (main) [ ] o.a.s.s.SolrDispatchFilter / __| ___| |_ _ Starting in standalone mode on port 8983
You can either use docker-compose.yml file to add an environment variable which alfresco-search-service's jetty server uses or update the startup script or update shared.properties with help of DockerFile.
To change the solr port you need to follow these instructions:
- Update following properties in 'JAVA_OPTS' section under 'alfresco' service defintion. E.g. 9999 is your custom port.
- Update following variable in 'environment' section under 'solr6' service defintion. E.g. 9999 is your custom port.
#Alfresco needs to know how to call solr - SOLR_SOLR_PORT=9999
- Add following variable in 'environment' section under 'solr6' service defintion. E.g. 9999 is your custom port.
#Solr jetty port, to start solr6 on port 9999
- Update port number in 'ports' section under 'solr6' service defintion. E.g. 9999 is your custom port.