mirror of
https://github.com/TheAnachronism/docspell.git
synced 2025-06-22 02:18:26 +00:00
Experiment with addons
Addons allow to execute external programs in some context inside docspell. Currently it is possible to run them after processing files. Addons are provided by URLs to zip files.
This commit is contained in:
@ -780,4 +780,75 @@ Docpell Update Check
|
||||
index-all-chunk = 10
|
||||
}
|
||||
}
|
||||
|
||||
addons {
|
||||
# A directory to extract addons when running them. Everything in
|
||||
# here will be cleared after each run.
|
||||
working-dir = ${java.io.tmpdir}"/docspell-addons"
|
||||
|
||||
# A directory for addons to store data between runs. This is not
|
||||
# cleared by Docspell and can get large depending on the addons
|
||||
# executed.
|
||||
#
|
||||
# This directory is used as base. In it subdirectories are created
|
||||
# per run configuration id.
|
||||
cache-dir = ${java.io.tmpdir}"/docspell-addon-cache"
|
||||
|
||||
executor-config {
|
||||
# Define a (comma or whitespace separated) list of runners that
|
||||
# are responsible for executing an addon. This setting is
|
||||
# compared to what is supported by addons. Possible values are:
|
||||
#
|
||||
# - nix-flake: use nix-flake runner if the addon supports it
|
||||
# (this requires the nix package manager on the joex machine)
|
||||
# - docker: use docker
|
||||
# - trivial: use the trivial runner
|
||||
#
|
||||
# The first successful execution is used. This should list all
|
||||
# runners the computer supports.
|
||||
runner = "nix-flake, docker, trivial"
|
||||
|
||||
# systemd-nspawn can be used to run the program in a container.
|
||||
# This is used by runners nix-flake and trivial.
|
||||
nspawn = {
|
||||
# If this is false, systemd-nspawn is not tried. When true, the
|
||||
# addon is executed inside a lightweight container via
|
||||
# systemd-nspawn.
|
||||
enabled = false
|
||||
|
||||
# Path to sudo command. By default systemd-nspawn is executed
|
||||
# via sudo - the user running joex must be allowed to do so NON
|
||||
# INTERACTIVELY. If this is empty, then nspawn is tried to
|
||||
# execute without sudo.
|
||||
sudo-binary = "sudo"
|
||||
|
||||
# Path to the systemd-nspawn command.
|
||||
nspawn-binary = "systemd-nspawn"
|
||||
|
||||
# Workaround, if multiple same named containers are run too fast
|
||||
container-wait = "100 millis"
|
||||
}
|
||||
|
||||
# The timeout for running an addon.
|
||||
run-timeout = "15 minutes"
|
||||
|
||||
# Configure the nix flake runner.
|
||||
nix-runner {
|
||||
# Path to the nix command.
|
||||
nix-binary = "nix"
|
||||
|
||||
# The timeout for building the package (running nix build).
|
||||
build-timeout = "15 minutes"
|
||||
}
|
||||
|
||||
# Configure the docker runner
|
||||
docker-runner {
|
||||
# Path to the docker command.
|
||||
docker-binary = "docker"
|
||||
|
||||
# The timeout for building the package (running docker build).
|
||||
build-timeout = "15 minutes"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user