Sign inSign up

bigcatum/wp-virtuoso-httpd

By bigcatum

•Updated over 5 years ago

A Virtuoso instance running behind an Apache reverse proxy, shipped with SNORQL explorer

Image
0

990

bigcatum/wp-virtuoso-httpd repository overview

⁠Virtuoso-httpd docker image with data loader

This repository is made to create a docker image that can run both Virtuoso and Apache web server in one container. It also facilitate data import into Virtuoso using custom-made bash script.

⁠Step 1 - Clone this repository

git clone https://github.com/wikipathways/virtuoso-httpd-docker.git

cd virtuoso-httpd-docker

⁠Step 2 - Build the docker image

docker build -t virtuoso-httpd .

⁠Step 3 - Run the docker container

Before running the container, make sure to create two folders: the first "PATH_TO_VIRTUOSO_DATA_FOLDER" is to store Virtuoso databases so you don't lose the graphs after importing them when the docker image is stopped (i.e. persistence). The second folder "PATH_TO_VIRTUOSO_IMPORT_FOLDER" is the location of RDF files that need to be imported into Virtuoso (the data loading tool will look for RDF files in this location which is mapped to /import inside the docker image).

Also, don't forget to replace "PASSWORD_HERE" with the password you set for Virtuoso.

For the first time you run the container, the password you should use is "dba". Then, you can change it from the web interface "http://localhost:8890⁠" and replace it in the next run for the container.

Also, if you don't know the default graph URI, don't include it in your run command. Otherwise, the queries will not work against the endpoint.

docker run --rm --name virtuoso-httpd \
    -p 8890:8890 -p 1111:1111 \
    -p 8080:80 -p 443:443 \
    -e DBA_PASSWORD=PASSWORD_HERE \
    -e SPARQL_UPDATE=true \
    -e DEFAULT_GRAPH=http://example.com \
    -e SNORQL_ENDPOINT=http://sparql.wikipathways.org/sparql \
    -e SNORQL_EXAMPLES_REPO=https://github.com/wikipathways/SPARQLQueries \
    -e SNORQL_TITLE="WikiPathways Snorql UI" \
    -v PATH_TO_VIRTUOSO_DATA_FOLDER:/data \
    -v PATH_TO_VIRTUOSO_IMPORT_FOLDER:/import \
    -d virtuoso-httpd

⁠Step 4 (Optional) - Loading data

If you need to import RDF data into Virtuoso, just make sure the RDF file is in the directory you already mapped to /import in the run command (step 3). Then run the following command from terminal (make sure to change to file name and the graph IRI where you want to load the data under in Virtuoso):

docker exec -i virtuoso-httpd bash -c "/load.sh FILE_TO_IMPORT GRAPH_IRI /data/load.log dba"

Tag summary

Content type

Image

Digest

Size

131.1 MB

Last updated

over 5 years ago

docker pull bigcatum/wp-virtuoso-httpd