Skip to content

How do I configure Qanary services using Docker containers?

Paul Heinze edited this page May 7, 2022 · 4 revisions

This will give you a general overview over how to configure a Qanary service (pipeline or components) that are running in Docker containers.

For more detailed instructions on specific properties, as well as networking, please see further resources at the end of this page.

tl;dr

Use environment variables to set or override properties.

Defining Property Values

For both the Qanary pipeline and components, configuration properties are defined in a local.properties file as key-value pairs: property.name=value.

To override the default values set in application.properties the use of environment variables is encouraged, and will be the only method used in these guides.

Example: the value of property server.port is specified using the environment variable SERVER_PORT.

Docker run

Example: Use the following command to start a service (component)

docker run -p 5555:5555 \
-e SERVER_PORT=5555 \
-e SPRING_BOOT_ADMIN_URL=http://example.pipeline:8080 \
-e SPRING_BOOT_ADMIN_CLIENT_INSTANCE_SERVICE-BASE-URL=http://example.component:5555 \
example-component:latest

Docker-Compose

Above configurations using the standard docker run command can also be applied in a docker-compose.yml file

version: "3.5"
services:
  example-component:
    image: example-component:latest
      ports:
        - "5555:5555"
      environment:
        - "SERVER_PORT=5555"
        - "SPRING_BOOT_ADMIN_URL=http://example.pipeline:8080"
        - "SPRING_BOOT_ADMIN_CLIENT_INSTANCE_SERVICE-BASE-URL=http://example.component:5555"

Specific Configurations

This guide is only meant to give you a general overview. Qanary components and pipeline implementations will require different parameters, based on the context. Especially when connecting components to a pipeline, setting the correct parameters for networking might not be trivial.

Please read the specific guides to learn more:

Clone this wiki locally