|
This version is still in development and is not considered stable yet. For the latest stable version, please use Korvet 0.12.5! |
Running with Docker
This guide shows how to run Korvet using Docker.
Quick Start
Run Korvet with default configuration:
docker run -p 9092:9092 redisfield/korvet:latest
This starts Korvet on port 9092 with an embedded Redis instance.
Using External Redis
To use an external Redis instance:
docker run -p 9092:9092 \
-e KORVET_REDIS_URI=redis://redis.example.com:6379 \
redisfield/korvet:latest
With authentication:
docker run -p 9092:9092 \
-e KORVET_REDIS_URI=redis://redis.example.com:6379 \
-e KORVET_REDIS_USERNAME=default \
-e KORVET_REDIS_PASSWORD=${REDIS_PASSWORD} \
redisfield/korvet:latest
Docker Compose
Create a docker-compose.yml file:
services:
redis:
image: redis:8.6
ports:
- "6379:6379"
korvet:
image: redisfield/korvet:latest
ports:
- "9092:9092"
environment:
KORVET_REDIS_URI: redis://redis:6379
depends_on:
- redis
With Redis authentication:
services:
redis:
image: redis:8.6
command: redis-server --requirepass ${REDIS_PASSWORD}
ports:
- "6379:6379"
korvet:
image: redisfield/korvet:latest
ports:
- "9092:9092"
environment:
KORVET_REDIS_URI: redis://redis:6379
KORVET_REDIS_PASSWORD: ${REDIS_PASSWORD}
depends_on:
- redis
Run with:
docker compose up
Configuration
See Configuration for all available options.
JVM Tuning
The Docker image accepts JVM options through the JAVA_OPTS environment variable.
Use this to increase heap size or apply additional JVM tuning flags.
For example, to run with a 2 GiB heap:
docker run -p 9092:9092 \
-e JAVA_OPTS="-Xms2g -Xmx2g" \
redisfield/korvet:latest
Direct Memory for High Concurrency
For production deployments with many concurrent connections (e.g., Databricks Spark, Flink), increase the direct memory limit:
docker run -p 9092:9092 \
-e JAVA_OPTS="-Xms2g -Xmx2g -XX:MaxDirectMemorySize=256m" \
redisfield/korvet:latest
Or in Docker Compose:
services:
korvet:
image: redisfield/korvet:latest
environment:
JAVA_OPTS: "-Xms2g -Xmx2g -XX:MaxDirectMemorySize=256m"