Create Docker network
docker network create --subnet=172.18.0.0/16 mynetRun the solr on docker
docker run --name my_solr --net mynet --ip 172.18.0.22 -d -p 8983:8983 -t solrMake sure the Solr is running. Try to open an admin console http://localhost:8983/solr
Create solr Core for the application. The name should be the userIndex
docker exec -it --user=solr my_solr bin/solr create_core -c userIndexOr if you are using windows
winpty docker exec -it --user=solr my_solr bin/solr create_core -c userIndexCheckout or download the code and build an application
./gradlew build buildDockerOn windows use
gradlew.bat build buildDockerMake sure that you have an Application image on docker
docker imagesYou should see the application in the list of the images:
REPOSITORY TAG IMAGE ID CREATED SIZE
matmatch/matmatch-app 1.0-SNAPSHOT de9706a8259c 2 days ago 742MBStart the application using the same docker network
docker run --name matmatch --net mynet --ip 172.18.0.23 -p 8080:8080 -t matmatch/matmatch-app:1.0-SNAPSHOTThe API documentation in swagger format can be found under the following URL: http://localhost:8080/swagger-ui.html
Or in case you run the app on different host, you should replace the host name with the one where app is actually running.
If something isn't working or you have any questions, feel free to contact me.