-
Notifications
You must be signed in to change notification settings - Fork 25
How do I configure Qanary services using Docker containers?
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.
Use environment variables to set or override properties.
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
.
Example: Use the following command to start a service (component)
- named 'example component'
- using the Docker image 'example-component:latest'
- listening on 'http://example.component:5555'
- connecting to the Qanary pipeline instance on 'http://example.pipeline:8080'
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
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"
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:
-
How to establish a Docker-based Qanary Question Answering system
-
How to implement a new Qanary component
... using Java?
... using Python (Qanary Helpers)?
... using Python (plain Flask service)?