How can I set graph.set-vertex-id=true when running JanusGraph using the official Docker images?

Viewed 291

I am running JanusGraph using the official Docker image here: https://hub.docker.com/r/janusgraph/janusgraph

For my graph, I need to be able to set my own IDs for nodes and edges, and this can only be done when graph.set-vertex-id=true is set in the JanusGraph configuration. I am able to open the shell in the Docker container and edit the config file to include this option, but for it to take effect I believe I need to restart the graph, which I am not sure how to do from within the Docker container.

I believe I have two options, neither of which I know how to do or if they are possible:

  1. Launch the Docker image and edit the config file in the container as I have done, and then somehow restart the graph without restarting the container.
  2. Somehow launch the Docker image with the config already editied so that JanusGraph launches with graph.set-vertex-id=true already set.
1 Answers

There are two ways you could do it according to the project's git hub page.

  1. You could overwrite properties by setting environment variables as described here.

  2. You could mount the property file point to your local file as described here.

Related