You are reading the documentation for an outdated Corteza release. 2023.9 is the latest stable Corteza release.

Server plugins

Corteza implements the support for Go plugins which can be used to modify default behaviour of the server and provide new functionalities like workflow functions and types.

Enabling and adding plugins to Corteza instance

Plugins can be added to Corteza by specifying their location with PLUGINS_PATHS. Provide colon separated list of paths to plugin files (plugin file has .so extension). Paths can contain wildcards and will be resolved accordingly.

You can quickly disable all plugins by setting PLUGINS_ENABLED to false (enabled by default).

Versions

In case plugin is not fully compatible with Corteza, server will refuse to start. It will yield some variation of the following error:

Error: plugin.Open("myplugin"): plugin was built with a different version of package github.com/cortezaproject/corteza-server/pkg/rand

Plugins and Corteza inside Docker container

Plugins need to be accessible to server. You can either map files or directories via volume or copy files inside a new Docker image.

Using container volume parameter

docker run --rm -it \
  -v "$(pwd)/myplugin.so:/myplugin.so:ro" \
  -e "PLUGINS_PATHS=/myplugin.so" \
  "cortezaproject/corteza-server:2021.9"

Using docker compose configuration

services:
  server:
    image: cortezaproject/corteza:2021.9.3
    volumes:
     - "./plugins/plugin.so:/corteza/plugin.so:ro"