home » dokk/data.git
Author zPlus <zplus@peers.community> 2023-04-30 21:44:53
Committer zPlus <zplus@peers.community> 2023-04-30 21:44:53
Commit 7383209 (patch)
Tree e3aa8fd
Parent(s)

Merge repository data.dokk.org.git There was a separate repository named "data.dokk.org.git" that only contained basic instructions for creating a TDB2 (Apache Jena) database and instructions for starting Fuseki. The repository has been deleted and the little content in it has been moved here.


commits diff: f94230f..7383209
3 files changed, 63 insertions, 6 deletionsdownload


Diffstat
-rw-r--r-- README 14
-rw-r--r-- README.jena 18
-rw-r--r-- fuseki.service 37

Diff options
View
Side
Whitespace
Context lines
Inter-hunk lines
+8/-6 M   README
index b61e50b..dad75f6
old size: 287B - new size: 382B
@@ -1,7 +1,9 @@
1 - DOKK is a free, community-curated data repository.
1 + This repository contains the DOKK data.
2 2
3 - Repository https://clif.peers.community/dokk/data.git
4 - Mailing list https://clif.peers.community/dokk/dokk.mlist
5 - Website https://dokk.org
6 - IRC #peers at irc.libera.chat
7 - Peers https://peers.community
3 +
4 + Data repository https://clif.peers.community/dokk/data.git
5 + Website repository https://clif.peers.community/dokk/dokk.org.git
6 + Mailing list https://clif.peers.community/dokk/dokk.mlist
7 + Website https://dokk.org
8 + IRC #peers at irc.libera.chat
9 + Peers https://peers.community

+18/-0 A   README.jena
index 0000000..80c9351
old size: 0B - new size: 766B
new file mode: -rw-r--r--
@@ -0,0 +1,18 @@
1 + This document contains some useful commands for creating a database of the DOKK
2 + data, that can be queried with SPARQL.
3 +
4 + Note: the tools used here are available for download at
5 + <https://jena.apache.org/download/#apache-jena-binary-distributions>
6 + Just download "apache-jena-<version>.tar.gz" and "apache-jena-fuseki-<version>.tar.gz"
7 +
8 + Create a database:
9 +
10 + tdb2.tdbloader --loc=database dokk/data/*.ttl
11 +
12 + Query from command line:
13 +
14 + tdb2.tdbquery --loc=database "select distinct ?s where { ?s ?p ?o } order by ?s limit 10"
15 +
16 + It's also possible to start a standalone server (Fuseki) that is queryable via
17 + HTTP. All you have to do is create the database first (with the above commands),
18 + and then start Fuseki. For an example see the "fuseki.service" file.

+37/-0 A   fuseki.service
index 0000000..3119875
old size: 0B - new size: 1K
new file mode: -rw-r--r--
@@ -0,0 +1,37 @@
1 + # This is an example service file for systemd. If using the Fuseki server, this
2 + # service can be configured to automatically start the server.
3 + #
4 + # How to use this file:
5 + # - copy this file to /etc/systemd/system
6 + # - edit the variables below accordingly
7 + # - systemctl enable fuseki.service
8 + # - systemctl start fuseki.service
9 +
10 + [Unit]
11 + Description=Fuseki server for DOKK
12 + After=network.target
13 +
14 + [Service]
15 + # Folder of the Fuseki installation files
16 + Environment=FUSEKI_HOME=/home/fuseki/fuseki-server
17 +
18 + # Fuseki runtime folder (will contain configuration files and other runtime files).
19 + Environment=FUSEKI_BASE=/home/fuseki/fuseki-run
20 +
21 + # Edit the line below to adjust the amount of memory allocated to Fuseki
22 + Environment=JVM_ARGS=-Xmx2G
23 +
24 + # Command for launching the Fuseki server
25 + ExecStart=/home/fuseki/fuseki-server/fuseki-server --loc=/home/fuseki/database --port=6000 --localhost /dokk
26 +
27 + User=fuseki
28 + Group=fuseki
29 + WorkingDirectory=/home/fuseki/fuseki-server
30 + Restart=always
31 +
32 + # Java processes exit with status 143 when terminated by SIGTERM, this
33 + # should be considered a successful shutdown
34 + SuccessExitStatus=143
35 +
36 + [Install]
37 + WantedBy=multi-user.target