If you’re familiar with Neo4j most likely you’re aware that Neo4j delivers an offical docker image. This short post shows a script allowing you to bundle a Neo4j docker container with the latest version of Bloom – a graph visualization product from Neo4j. Additionally it bundles also the matching version of the APOC library to your docker container.
Main goal for the script is to have a quick and easy way to start up a docker container with APOC and Bloom on board. It should care about downloading these library if necessary.
Be sure to have cURL
, unzip
and jq
installed on your machine before proceeding.
First we define some variable which you might want to change (l. 11-15):
- used neo4j version,
- bloom version,
- license file
- and the neo4j admin password (don’t use “123” in your setup, seriously).
Be aware that Bloom requires a license file. If you want to test drive Bloom get in touch via https://neo4j.com/bloom/request.
Bundling APOC is somewhat tricky: The APOC version number is tightly bound to the Neo4j version number since APOC uses non-public APIs. Luckily there’s a version compatibility matrix in machine readable format available. We fetch that JSON file via
and filter for the entry fitting our desired version with cURL
jq
(see lines 26-31).
Next we download the server variant of Bloom (if not yet there) and extract the included jar file from it. Together with the license file both are placed into the plugins
folder.
At the end we tweak some config options as decribed in the APOC and Bloom manual.
Once the container is started you can access Bloom via http://localhost:7474/browser/bloom and using the “normal” Neo4j at http://localhost:7474/.
Happy blooming in Docker!
[embedGist source=”https://gist.github.com/sarmbruster/883e405cf8db04c9a3179d5dc9f300b3″]
I hope this quick script makes your life a little bit easier. You’re feedback is always welcome.