@ -44,9 +44,9 @@ It will create a fat binary in `target/release/oxigraph_server`.
## Usage
Run `oxigraph_server serve --location my_data_storage_directory` to start the server where `my_data_storage_directory` is the directory where you want Oxigraph data to be stored in. It listens by default on `localhost:7878`.
Run `oxigraph_server --location my_data_storage_directory serve` to start the server where `my_data_storage_directory` is the directory where you want Oxigraph data to be stored in. It listens by default on `localhost:7878`.
The server provides an HTML UI with a form to execute SPARQL requests.
The server provides an HTML UI, based on [YASGUI](https://yasgui.triply.cc), with a form to execute SPARQL requests.
It provides the following REST actions:
* `/query` allows to evaluate SPARQL queries against the server repository following the [SPARQL 1.1 Protocol](https://www.w3.org/TR/sparql11-protocol/#query-operation).
@ -63,7 +63,7 @@ It provides the following REST actions:
Use `oxigraph_server --help` to see the possible options when starting the server.
It is also possible to load RDF data offline using bulk loading:
curl -X POST -H 'Content-Type: application/sparql-update' --data 'DELETE WHERE { <http://example.com/s> ?p ?o }' http://localhost:7878/update
```
You could easily build your own Docker image by running `docker build -t oxigraph server -f server/Dockerfile .` from the root directory.
### Run the Web server with basic authentication
It can be useful to make Oxigraph SPARQL endpoint available publicly, with a layer of authentication to be able to add data.
To quickly use a single user/password you can define them in a `.env` file along the `docker-compose.yaml`:
```sh
cat <<EOF> .env
OXIGRAPH_USER=oxigraph
OXIGRAPH_PASSWORD=oxigraphy
EOF
```
Start the Oxigraph server and nginx proxy for authentication with `docker-compose`:
```bash
docker-compose up
```
In case you want to have multiple users, you can comment the `entrypoint:` line in the `docker-compose.yml` file, uncomment the `.htpasswd` volume, then generate each user in the `.htpasswd` file with this command: