-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding a docker compose for better startup #8
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Siddharth Golecha <[email protected]>
Signed-off-by: Siddharth Golecha <[email protected]>
4a91160
to
2f9d91b
Compare
I think it also solves #4. Because I added the volume here. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you @Siddharthgolecha for the contribution!
I tried docker compose up
but the network janus_bridge
was not created for some reason. Thus, I got the below error. Haven't check the reason yet. Potentially, it could be yml
formatting issue or something else.
$ docker compose up
[+] Running 15/15
✔ janusgraph-visualizer Pulled 1.9s
✔ janusgraph Pulled 18.7s
✔ gremlin-console Pulled 18.7s
✔ ff65ddf9395b Already exists 0.0s
✔ d226423ace4f Pull complete 1.8s
✔ 46866a8ee5fb Pull complete 2.7s
✔ 8c6b874ebfb3 Pull complete 2.8s
✔ a67a6c702afa Pull complete 2.8s
✔ d26a9468c062 Pull complete 2.9s
✔ f9844f27995d Pull complete 15.6s
✔ c98d023692d4 Pull complete 15.7s
✔ d501ffc73889 Pull complete 15.8s
✔ d2bfcaab598f Pull complete 15.8s
✔ 5bdbcca69b6b Pull complete 15.9s
✔ 4f4fb700ef54 Pull complete 16.0s
[+] Running 4/4
✔ Volume "janusgraph-visualizer_janusgraph-data" Created 0.0s
✔ Container janusgraph Created 0.2s
✔ Container gremlin-console Created 0.1s
✔ Container janusgraph-visualizer Created 0.1s
Attaching to gremlin-console, janusgraph, janusgraph-visualizer
Error response from daemon: network janus_bridge not found
### Supported Environment Variables | ||
|
||
* `GREMLIN_HOST` - sets gremlin server hostname for connection. Default is `localhost`. | ||
* `GREMLIN_HOST` - sets gremlin server hostname for connection. Default is `janusgraph`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The default value is still localhost
, but when started via docker-compose
then the environment variable GREMLIN_HOST
is supplied with janusgraph
. If people start it directly with docker run
then the default value will be localhost
and not janusgraph
. So this may be confusing. Maybe we should say that the default value is localhost
, but the supplied docker-compose.yml
will use janusgraph
instead. Maybe it's not even needed to be specified because people who will use docker-compose.yml
and will want to communicate with the GREMLIN_HOST
will use it's hostname anyways.
So, my suggestion is to either leave it as before or add a clarification comment.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The reason why this should bejanusgraph
is because when the people will be accessing the janusgraph
container, the localhost
would refer to janusgraph-visualizer
container and not the janusgraph
container. because of same network. That is why I changed it to janusgraph
because it will then point to that container. So, I think we should keep it as janusgraph
itself. If people will try to access janusgraph db outside the docker, they will be able to do so using localhost:8182 because the port of that is open.
* `GREMLIN_PORT` - sets gremlin server port for connection. Default is `8182`. | ||
* `GREMLIN_TRAVERSAL_SOURCE` - sets default graph traversal source name to be used for queries. Default is `g`. | ||
* `GREMLIN_DEFAULT_QUERY` - sets default query to show in visualizer. Default is `g.V()`. | ||
|
||
You can change these values in the .env file. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When docker compose
is used, you can specify these values via the .env file or supplying environment variables directly to the container.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I have created the .env
file for that and thanks for adding it to the README.md. I totally forgot to mention that 😅
Tbh, I am not sure why this happened. I tried it over MacOS and it was working perfectly fine. If you are still encountering issue, please let me know on how can I reproduce this |
Hi, I was experiencing the issue where using the instructions, I was not able to run the visualizer. So I create a docker compose file for the same.