Skip to content

Commit 6b7b71a

Browse files
committed
docs: rewrite BlazeGraph connection guide with practical instructions
1 parent e6fe108 commit 6b7b71a

1 file changed

Lines changed: 52 additions & 2 deletions

File tree

docs/guides/connecting-to-blazegraph.md

Lines changed: 52 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,55 @@
22

33
# Connecting to BlazeGraph
44

5-
- Build and run the Docker container as normal and connect Graph Explorer to BlazeGraph through the proxy server.
6-
- If using Docker, ensure that the container running Graph Explorer can properly access the container running BlazeGraph. You can find documentation on how to connect containers via [Docker networks](https://docs.docker.com/network/).
5+
[BlazeGraph](https://blazegraph.com/) is an open-source RDF graph database that supports the SPARQL query language. Graph Explorer connects to BlazeGraph through its SPARQL endpoint.
6+
7+
## Running BlazeGraph with Docker
8+
9+
Pull and run the BlazeGraph Docker image:
10+
11+
```
12+
docker run -d -p 9999:9999 --name blazegraph lyrasis/blazegraph:2.1.5
13+
```
14+
15+
You can verify BlazeGraph is running by visiting `http://localhost:9999/blazegraph/` in your browser.
16+
17+
## Connecting Graph Explorer
18+
19+
Open Graph Explorer and add a new connection with the following settings:
20+
21+
- Name: `BlazeGraph`
22+
- Query Language: `SPARQL`
23+
- Public or Proxy Endpoint: `https://localhost`
24+
- Using Proxy Server: `true`
25+
- Graph Connection URL: `http://localhost:9999/blazegraph/namespace/kb/sparql`
26+
27+
> [!NOTE]
28+
>
29+
> The default namespace in BlazeGraph is `kb`. If you created a custom namespace, replace `kb` with your namespace name in the Graph Connection URL.
30+
31+
## Docker Networking
32+
33+
If both Graph Explorer and BlazeGraph are running as Docker containers, they need to communicate over a shared Docker network. The default `localhost` address won't work between containers.
34+
35+
1. Create a Docker network:
36+
```
37+
docker network create graph-net
38+
```
39+
2. Run BlazeGraph on the network:
40+
```
41+
docker run -d -p 9999:9999 --name blazegraph --network graph-net lyrasis/blazegraph:2.1.5
42+
```
43+
3. Run Graph Explorer on the same network:
44+
```
45+
docker run -p 80:80 -p 443:443 \
46+
--name graph-explorer \
47+
--network graph-net \
48+
--env HOST=localhost \
49+
public.ecr.aws/neptune/graph-explorer
50+
```
51+
4. Use the container name as the hostname in the Graph Connection URL:
52+
```
53+
http://blazegraph:9999/blazegraph/namespace/kb/sparql
54+
```
55+
56+
For more details on container networking, see the [Docker networks documentation](https://docs.docker.com/network/).

0 commit comments

Comments
 (0)