Skip to content

Commit 6dc702d

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

1 file changed

Lines changed: 52 additions & 2 deletions

File tree

Lines changed: 52 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,54 @@
11
# Connecting to BlazeGraph
22

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

0 commit comments

Comments
 (0)