Neo4j
This guide shows you how to use Neo4j, one of the most popular open source graph databases. To run this example, follow these steps:
-
Install the CLI. Use the unikraft CLI. You need a BuildKit builder. The easiest way to get one is via Docker. Alternatively, you can also directly set up and use BuildKit, see the quick start.
-
Clone the
examplesrepository andcdinto theexamples/neo4j/directory:Code
Make sure to log into Unikraft Cloud and pick a metro close to you.
This guide uses fra (Frankfurt, 🇩🇪):
unikraft
When done, invoke the following command to deploy this app on Unikraft Cloud:
unikraft
You can also set a custom password for the default neo4j user by adding the
following env var to the run command
-e "NEO4J_AUTH_PASSWORD=..."
The output shows the instance address and other details:
unikraft
In this case, the instance name is neo4j-t117i and the address is https://fragrant-fog-pj1gi4jl.fra.unikraft.app
They're different for each run.
Use curl to query the Unikraft Cloud Neo4j instance:
Code
Code
Or even better, point a browser at it 😀. Make sure you have the protocol set
to neo4j+s when logging in.
You can also try connecting to the instance using the cypher-shell CLI
Code
You can list information about the instance by running:
When done, you can remove the instance:
unikraft
Using volumes
You can use volumes for data persistence for your neo4j instance. For that you would first create a volume:
unikraft
Then start the neo4j instance and mount that volume:
unikraft
Customize your app
To customize the app, update the files in the repository, listed below:
Kraftfile: the Unikraft Cloud specification, including command-line argumentsDockerfile: In case you need to add files to your instance's rootfs
Learn more
Use the --help option for detailed information on using Unikraft Cloud:
unikraft
Or visit the CLI Reference