Reputation: 325
What is the best way to run 2 neo4j
instances (with separate DBs)? I currently use Docker and having two instances on different ports seems to be working while only one instance is running, however when both - I can't get connection of either.
Upvotes: 1
Views: 172
Reputation: 4052
You can start two Neo4j instances without any issues with or without docker.
Without Docker:
Change the Neo4j ports for http, https and bolt connections in neo4j.conf
for one of the instance so that both starts on different ports.
With Docker:
You don't have to change neo4j config.
You can give port mapping in docker run command with -p
like:
docker run -d --rm --name neo4j-prod -p 11001:7474 -p 11002:7687 neo1
And for second instance use 7474 & 7687 instead of 11001&11002 resp. In this case you don't have to mention it in command.
Upvotes: 1