Skip to content

Commit

Permalink
Update documentation to address how to create a dataset with tdbloader,
Browse files Browse the repository at this point in the history
and use the correct image.
  • Loading branch information
kinow committed Jun 8, 2023
1 parent 8e9b627 commit 50f74b0
Showing 1 changed file with 30 additions and 8 deletions.
38 changes: 30 additions & 8 deletions dockerfiles/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,19 +46,31 @@ without Docker Compose, you can try the following command before loading your
vocabulary data. It starts a container in the same way our other example with
the `docker-compose` command.

export JENA_4_VERSION=4.7.0

docker build -t jena-fuseki:$JENA_4_VERSION --build-arg JENA_VERSION=$JENA_4_VERSION \
--no-cache dockerfiles/jena-fuseki2-docker

mkdir -p databases/skosmos
# You need to install an Apache Jena Binary Distribution version
# from https://jena.apache.org/download/index.cgi
tdb2.tdbloader --loc databases/skosmos ./dockerfiles/config/skosmos.ttl

docker run --name fuseki -ti --rm \
--env "ADMIN_PASSWORD=admin" --env "JVM_ARGS=-Xmx2g" \
-p 3030:3030 \
--mount type=bind,src=$(pwd)/config/skosmos.ttl,dst=/fuseki/configuration/skosmos.ttl \
stain/jena-fuseki
--env "JAVA_OPTIONS=-Xmx2g -Xms1g" \
-p 3030:3030 \
-v $(pwd)/databases:/fuseki/databases \
jena-fuseki:$JENA_4_VERSION \
--tdb2 --loc databases/skosmos /skosmos

curl -XPOST http://localhost:3030/skosmos/query -d "query=SELECT ?a WHERE { ?a ?b ?c }"

## Running with docker-compose

The `docker-compose` provided configuration will prepare three containers.
The first one called `skosmos-fuseki`, which uses the `stain/jena-fuseki`
image for Jena, and starts a container with 2 GB of memory and `admin` as
the user and password. The `docker-compose` service name of this container
is `fuseki`.
The first one called `skosmos-fuseki`, which uses the Apache Jena
image for Fuseki, and starts a container with 2 GB of memory. The
`docker-compose` service name of this container is `fuseki`.

The second container is the `fuseki-cache`, a Varnish Cache container. It sits
between the `skosmos-fuseki` and the `skosmos-web` (more on this below). The
Expand All @@ -80,6 +92,16 @@ extension.
To the host machine Docker Compose is exposing these values as `localhost:3030`
and `localhost:9031` respectively.

Before creating the containers, you will have to initialize an Apache Fuseki
dataset to be used by the `skosmos-fuseki` container.

cd dockerfiles/

mkdir -p databases/skosmos
# You need to install an Apache Jena Binary Distribution version
# from https://jena.apache.org/download/index.cgi
tdb2.tdbloader --loc databases/skosmos ./config/config-docker-compose.ttl

To create the containers in this example setup, you can use this command
from the `./dockerfiles/` directory:

Expand Down

0 comments on commit 50f74b0

Please sign in to comment.