Skip to content

Commit

Permalink
Merge pull request #21 from zazuko/trifid-v5
Browse files Browse the repository at this point in the history
Trifid v5
  • Loading branch information
ludovicm67 authored Mar 11, 2024
2 parents ec502ff + 8b84f5d commit 3896cc7
Show file tree
Hide file tree
Showing 6 changed files with 1,745 additions and 2,417 deletions.
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
FROM docker.io/library/node:20-alpine

# build the app
# Build the app
WORKDIR /app
COPY package.json package-lock.json ./
ENV NODE_ENV="production"
RUN npm ci
COPY . .

# run as the "node" user
# Run as the "node" user
USER 1000

# expose the HTTP service under the unprivileged (>1024) http-alt port
# Expose the HTTP service under the unprivileged (>1024) http-alt port
EXPOSE 8080

CMD [ "npm", "run", "start" ]
62 changes: 30 additions & 32 deletions config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,64 +6,62 @@ template:

globals:
datasetBaseUrl: https://ld.zazuko.com/
sparqlEndpoint:
url: env:SPARQL_ENDPOINT_URL
username: env:SPARQL_ENDPOINT_USER
password: env:SPARQL_ENDPOINT_PASSWORD
endpoints:
default:
url: /query

middlewares:
plugins:
welcome:
module: trifid-core/middlewares/view.js
order: 0
module: trifid-core/plugins/view.js
paths: /
methods: GET
config:
path: views/welcome.hbs

parameters:
module: trifid-core/middlewares/view.js
order: 0
paths: /parameters
module: trifid-core/plugins/view.js
paths:
- /parameters
- /parameters/
methods: GET
config:
path: views/parameters.hbs

rewrite:
module: trifid-core/middlewares/rewrite.js

entity-renderer:
module: "@zazuko/trifid-entity-renderer"
config:
followRedirects: true
resourceExistsQuery: "ASK { GRAPH ?g { <{{iri}}> ?p ?o } }"
resourceGraphQuery: "#pragma describe.strategy cbd\nDESCRIBE <{{iri}}>"
containerExistsQuery: 'ASK { GRAPH ?g { ?s a ?o. FILTER REGEX(STR(?s), "^{{iri}}") } }'
labelLoader:
labelNamespaces:
- https://ld.zazuko.com
chunkSize: 30
concurrency: 2
timeout: 1000

yasgui:
module: trifid-plugin-yasgui
paths: /sparql
paths:
- /sparql
- /sparql/
config:
urlShortener: https://s.zazuko.com/api/v1/shorten

sparql-proxy:
module: "@zazuko/trifid-plugin-sparql-proxy"
paths: /query
graph-explorer:
module: trifid-plugin-graph-explorer
config:
queryOperation: postQueryUrlencoded
cache:
prefix: env:SPARQL_PROXY_CACHE_PREFIX
url: env:SPARQL_PROXY_CACHE_URL
ttl: env:SPARQL_PROXY_CACHE_TTL
clearAtStartup: env:SPARQL_PROXY_CACHE_CLEAR_AT_STARTUP
dataLabelProperty: <http://schema.org/name> | rdfs:label
schemaLabelProperty: <http://schema.org/name> | rdfs:label

handle-redirects-demo:
module: "@zazuko/trifid-handle-redirects"
spex:
module: trifid-plugin-spex

sparql-handler:
module: "trifid-handler-sparql"
sparql-proxy:
module: "@zazuko/trifid-plugin-sparql-proxy"
paths:
- /query
- /query/
config:
resourceExistsQuery: "ASK { GRAPH ?g { <${iri}> ?p ?o } }"
resourceGraphQuery: "#pragma describe.strategy cbd\nDESCRIBE <${iri}>"
containerExistsQuery: 'ASK { GRAPH ?g { ?s a ?o. FILTER REGEX(STR(?s), "^${iri}") } }'
endpointUrl: env:SPARQL_ENDPOINT_URL
username: env:SPARQL_ENDPOINT_USER
password: env:SPARQL_ENDPOINT_PASSWORD
Loading

0 comments on commit 3896cc7

Please sign in to comment.