-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
47 lines (36 loc) · 1.06 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
VERSION=$(shell git describe | sed 's/^v//')
all:
curate:
rm -rf inno-db
make turtle
docker run -v $$(pwd):/files \
docker.io/cybermaggedon/sparql-service-rocksdb \
rdfproc -n -s rocksdb /files/inno-db parse /files/data.ttl turtle
# RDFlib doesn't seem to output prefix for rdf: namespace?!
turtle:
./process/curate data schema > data.ttl.tmp
( \
echo '@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .';\
cat data.ttl.tmp; \
) > data.ttl
rm -f data.ttl.tmp
REPO=europe-west1-docker.pkg.dev/pivot-labs/pivot-labs
WEB_CONTAINER=${REPO}/web:${VERSION}
SPARQL_CONTAINER=${REPO}/sparql:${VERSION}
images: curate
docker build -f Containerfile.web -t web .
docker build -f Containerfile.sparql -t sparql .
docker tag web ${WEB_CONTAINER}
docker tag sparql ${SPARQL_CONTAINER}
push:
docker push ${WEB_CONTAINER}
docker push ${SPARQL_CONTAINER}
clean:
-rm -f ${PROJECT}.db
podman run -d --name web \
-p 8080/tcp --expose=8080 \
${WEB_CONTAINER}
podman run -d --name sparql -p 8089/tcp \
${SPARQL_CONTAINER}
stop:
podman rm -f web sparql