Configuration options

This reference documentation details all available configuration options that can be specified in a collection’s configuration file to configure the Open Terms Archive engine.

As an example, see the production configuration file of the Demo collection.

Options 🔗

trackingSchedule string
Defines how often the engine should check for changes in terms. Uses standard cron syntax to set the schedule.
Default:30 */12 * * * (runs every 12 hours at minute 30)
collectionPath string
Path to the collection’s directory containing declarations directory and metadata file, relative to the engine execution location
Default:./
Example:../collections/demo-declarations

Recorder 🔗

The recorder section manages how versions and snapshots of terms are stored, supporting multiple storage backends.

recorder.versions.storage object
Configuration for storing versions. Supports Git and MongoDB. See Storage Repositories for more information.
recorder.snapshots.storage object
Configuration for storing snapshots. Supports Git and MongoDB. See Storage Repositories for more information.

Fetcher 🔗

The fetcher section configures how the engine retrieves documents from the web.

fetcher.waitForElementsTimeout number
Maximum wait time for elements to appear in a page (milliseconds).
Default:10000
fetcher.navigationTimeout number
Maximum wait time for a page to load (milliseconds).
Default:30000
fetcher.language string
Language code (ISO 639-1) for request headers.
Default:en

Notifier 🔗

The notifier section sets up how notifications are sent when new versions of terms are recorded.

notifier.sendInBlue.updatesListId string
SendInBlue contacts list ID of persons to notify on terms updates.
Default:850
notifier.sendInBlue.updateTemplateId string
SendInBlue email template ID used for updates notifications.
Default:7

Logger 🔗

The logger section configures logging and error notification settings.

logger.smtp.host string
SMTP server hostname.
Default:smtp-relay.sendinblue.com
logger.smtp.username string
Username for SMTP server authentication.
Default:admin@opentermsarchive.org
logger.sendMailOnError.to string
Email address for error notifications.
Example:admin@example.com
logger.sendMailOnError.from string
Sender email address for error notifications.
Example:noreply@example.com
logger.sendMailOnError.sendWarnings boolean
Set to true to also send email in case of warning.
Default:false
logger.timestampPrefix boolean
Set to false to avoid duplicate timestamps if logs are managed by a process manager.
Default:true

Reporter 🔗

The reporter section manages how issues are reported when terms content is inaccessible, supporting GitHub and GitLab.

reporter.type string
Type of reporter
Example:github
Allowed values:github, gitlab
reporter.repositories.declarations string
Repository for creating issues.
Example:OpenTermsArchive/demo-declarations
reporter.repositories.versions string
Repository for versions.
Example:OpenTermsArchive/demo-versions
reporter.repositories.snapshots string
Repository for snapshots.
Example:OpenTermsArchive/demo-snapshots
reporter.baseURL string
Base URL for GitLab (if applicable).
Example:https://gitlab.example.com
reporter.apiBaseURL string
API base URL for GitLab (if applicable).
Example:https://api.gitlab.example.com

Dataset 🔗

The dataset section configures how datasets are published.

dataset.title string
Title of the dataset.
Default:sandbox
dataset.versionsRepositoryURL string
Repository URL for dataset releases.
Default:https://github.com/OpenTermsArchive/sandbox
dataset.publishingSchedule string
Cron expression for dataset publishing.
Default:30 8 * * MON (runs every Monday at 8:30 AM)

Collection API 🔗

The collection API section sets the parameters for the API server.

collection-api.api.port number Required
Port number for the API server.
Example:8080
collection-api.api.basePath string Required
Base path for API endpoints.
Example:/collection-api

Storage Repositories 🔗

The storage repositories section set the parameters for supported backends for storing versions and snapshots, supporting Git and MongoDB.

storage.type string
Type of storage backend.
Default:git
Allowed values:git, mongo

Git 🔗

The Git storage configuration allows to store versions in a Git repository.

storage.git.path string
Path to the versions database directory.
Default:./data/versions
storage.git.publish boolean
Boolean to push changes to the origin.
Default:false
storage.git.snapshotIdentiferTemplate string
Template for snapshot ID reference. %SNAPSHOT_ID will be replaced with the actual snapshot ID.
Default:./data/snapshots/%SNAPSHOT_ID
storage.git.author.name string
Author name for changes.
Default:Open Terms Archive Bot
storage.git.author.email string
Author email for changes.
Default:bot@opentermsarchive.org

MongoDB 🔗

The MongoDB storage configuration allows to store versions in a MongoDB database.

storage.mongo.connectionURI string
MongoDB connection URI.
Default:mongodb://127.0.0.1:27017
storage.mongo.database string
Database name.
Default:open-terms-archive
storage.mongo.collection string
Collection name.
Default:snapshots