Skip to content

Docker Configuration

When running Chronicle in Docker, you can configure it using either mounted configuration files or environment variables.

{
"port": 35000,
"storage": {
"type": "MongoDB",
"connectionDetails": "mongodb://mongo:27017"
}
}
PropertyTypeDescription
portnumberThe single Chronicle port exposed by the container — gRPC (HTTP/2) and HTTP/1.1
storage.typestringStorage provider type
storage.connectionDetailsstringMongoDB connection string used in the container network

Mount the chronicle.json file as a read-only volume:

Terminal window
docker run -d \
--name chronicle \
-p 35000:35000 \
-v /path/to/chronicle.json:/app/chronicle.json:ro \
cratis/chronicle:latest

Pass configuration via environment variables using the -e flag:

Terminal window
docker run -d \
--name chronicle \
-e Cratis__Chronicle__Port=35000 \
-e Cratis__Chronicle__HealthCheckEndpoint=/health \
-e Cratis__Chronicle__Storage__Type=MongoDB \
-e Cratis__Chronicle__Storage__ConnectionDetails=mongodb://mongo:27017 \
-e Cratis__Chronicle__Observers__SubscriberTimeout=10 \
-p 35000:35000 \
cratis/chronicle:latest

For Docker Compose setups, see Running with Docker Compose.