Skip to content

Module Configuration

Aaron Coburn edited this page Mar 5, 2021 · 14 revisions

Trellis consists of various modules that are assembled into a single application. Many of these modules can be configured at runtime with environment variables or system properties.

The configuration keys for each module are described here:

HTTP

  • trellis.http.base-url - A base URL
  • trellis.http.cache-max-age - The max-age for HTTP cache headers
  • trellis.http.cache-revalidate - Whether cached response must be revalidated
  • trellis.http.cache-nocache - Whether to disable cache handling
  • trellis.http.extension-graphs - Extension graphs used for auxiliary resource discovery
  • trellis.http.jsonld-profile - The default JSON-LD profile
  • trellis.http.ldp-model-modifications - Whether to permit LDP interaction model modifications
  • trellis.http.memento-header-dates - Whether to include Memento date headers
  • trellis.http.patch-create - Whether to support resource creation on PATCH requests
  • trellis.http.precondition-required - Whether to require preconditions on PUT
  • trellis.http.put-uncontained - Whether PUT requests create uncontained resources
  • trellis.http.versioning - Whether the HTTP layer creates mementos
  • trellis.http.weak-etag - Whether to use weak ETags in RDF responses
  • trellis.http.web-sub-hub - A websubhub URL

Persistence

Triplestore

  • trellis.triplestore.rdf-location - The location of the RDF store (file path or URL)
  • trellis.triplestore.ldp-type - Whether to include the LDP type in RDF responses

Database

  • trellis.jdbc.url - The JDBC connection URL (for Quarkus-based deployments, this is quarkus.datasource.jdbc.url)
  • trellis.jdbc.batch-size - The size of batched queries (default=1000)
  • trellis.jdbc.ldp-type - Whether to include the LDP type in RDF responses
  • trellis.jdbc.direct-containment - Whether to support Direct containers
  • trellis.jdbc.indirect-containment - Whether to support Indirect containers

File-based binary and memento storage

  • trellis.file.binary-path - The base file path for the binary resources
  • trellis.file.binary-hierarchy - The levels of hierarchy for storing binaries
  • trellis.file.binary-length - The length of each hierarchy level (usually 2 or 3)
  • trellis.file.memento-path - The base file path for the memento resources
  • trellis.file.namespace-path - The path to a namespace document (formatted as JSON-LD)
  • trellis.file.ldp-type - Whether to include the LDP type on resource responses

Access Control

  • trellis.auth.admin-users - Users who should be considered admins
  • trellis.auth.realm - The authentication realm to use (default=trellis)

WebACL

  • trellis.webac.challenges - The challenges to use, separated by comma (e.g. Basic,Bearer)
  • trellis.webac.membership-check - Whether to enforce WebAC on membership resources
  • trellis.webac.default-acl-location - The location of a resource to initialize the root ACL (file://, https:// or classpath locations are supported)

RDF I/O processing

RDF generation

  • trellis.jena.jsonld-profiles - An accept list of JSON-LD profiles
  • trellis.jena.jsonld-domains - An accept list of JSON-LD domain names
  • trellis.jena.relative-iris - Whether to use relative IRIs in responses

RDFa/HTML generation

  • trellis.rdfa.template - A mustache template for HTML generation
  • trellis.rdfa.css - CSS URL(s) to use with RDFa
  • trellis.rdfa.icon - an icon URL to use with RDFa
  • trellis.rdfa.js - JS URL(s) to use with RDFa

Namespace processing

  • trellis.namespace.mapping - A key-value mapping for namespaces (e.g. dc11=http://purl.org/dc/elements/1.1/, dc=http://purl.org/dc/terms/)

Application wrappers

Quarkus application wrapper

  • trellis.quarkus.profile-cache-size - The size of the JSON-LD profile cache
  • trellis.quarkus.profile-cache-expire-hours - The number of hours after which items are removed from the profile cache
  • trellis.quarkus.authz-cache-size - The authorization cache size
  • trellis.quarkus.authz-cache-expire-seconds - The number of seconds after which items are removed from the authz cache