How to use Solr @ Hipex using Docker
Solr is run using Docker, for the rest of this tutorial we assume you are familiar with the docker basics.
In the docker service configuration you will define the version and port where solr will be available. In the examples
we will use version 6.6 and port
We suggest placing the
docker-compose.yml in its own folder. For example
version: "3.2" services: solr: image: "solr:6.6-slim" restart: "always" volumes: - ./data:/var/solr ports: - "18983:8983"
Since we are using a mounted volume we also need to create the
cd ~/solr/ mkdir data
Now the service can be started with
hipex docker:compose:up --detach
When receiving a
Bind for 0.0.0.0:18983 failed: port is already allocated error. The configured port
already in use and another port must be configured.
Although possible using a nginx proxy it would be a security risk to allow your instance to be publicly accessible. So a SSH tunnel is needed to access your solr instance. Once the tunnel has been made you can visit http://localhost:18983/ to access the web ui.
Starting an SSH tunnel from your local machine:
ssh -L 18983:localhost:18983 <user>@<server> -p 339 -N