Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/backtest-kit/backtest-kit-minio-s3-docker/llms.txt

Use this file to discover all available pages before exploring further.

The infrastructure layer for backtest-kit-minio-s3-docker is split into two independent Compose files — docker/minio/docker-compose.yaml and docker/redis/docker-compose.yaml — rather than a single monolithic file. This separation means you can restart or upgrade either service without touching the other, run them on separate hosts, or swap in an external managed MinIO or Redis cluster by pointing the application’s environment variables elsewhere. Both files are designed for a local or on-premise host-mode deployment where the backtest-kit process (or container) connects to the services on localhost / 127.0.0.1.

MinIO service

MinIO is the S3-compatible object store that serves as the source of truth for all persisted backtest-kit data. All 16 persistence adapters write JSON objects into a single bucket named backtest-kit, organised under entity-specific key prefixes (candle-items/, signal-items/, etc.).
docker/minio/docker-compose.yaml
services:
  minio:
    image: docker.io/tripolskypetr/minio:2022
    ports:
      - '9000:9000'
      - '9001:9001'
    volumes:
      - './minio_data:/data'
    environment:
      - MINIO_ROOT_USER=minioadmin
      - MINIO_ROOT_PASSWORD=minioadmin
      - MINIO_DEFAULT_BUCKETS=backtest-kit
    restart: always
volumes:
  minio_data:

Ports

PortPurpose
9000S3-compatible API — the endpoint backtest-kit connects to for all object reads and writes
9001MinIO web console — browser-based bucket browser and administration UI

Volume

The ./minio_data:/data bind mount persists all bucket objects to a local directory called minio_data next to the Compose file. Data survives container restarts and recreations.

Environment variables

VariableValueDescription
MINIO_ROOT_USERminioadminRoot access key used to authenticate S3 API requests
MINIO_ROOT_PASSWORDminioadminRoot secret key
MINIO_DEFAULT_BUCKETSbacktest-kitBucket created automatically on first start — must match the bucket name expected by the persistence adapters

Starting MinIO

docker-compose -f docker/minio/docker-compose.yaml up -d
Once MinIO is running, open the web console at http://localhost:9001 and log in with the credentials above (minioadmin / minioadmin). You can browse the backtest-kit bucket, inspect individual object keys, and monitor storage usage — useful when debugging why a particular candle or signal is not appearing in the UI.
The default MINIO_ROOT_USER=minioadmin / MINIO_ROOT_PASSWORD=minioadmin credentials are publicly documented and must be replaced before any production or internet-facing deployment. Update both the Compose file and the corresponding CC_MINIO_ACCESSKEY / CC_MINIO_SECRETKEY values in .env.

Redis service

Redis acts as the time-ordered index for the three entities that require newest-first listings: Log, Notification, and Storage. Rather than relying on costly S3 key scans, a connection service maintains per-minute Redis sets so that listNewest(limit) resolves in a handful of pipeline RTTs regardless of how many objects the bucket holds.
docker/redis/docker-compose.yaml
version: '3.8'

services:
  redis:
    image: redis:7.4.1
    container_name: redis
    ports:
      - "6379:6379"
    environment:
      - REDIS_PASSWORD=mysecurepassword
    command: ["redis-server", "--requirepass", "mysecurepassword"]
    volumes:
      - ./redis_data:/data
    restart: always

volumes:
  redis_data:

Port

Redis listens on its default port 6379, mapped directly from the container to the host.

Volume

The ./redis_data:/data bind mount persists the RDB snapshot so the time index survives a Redis restart. If Redis is flushed or the volume is lost, the application automatically falls back to a bucket LIST scan and re-warms the index.

Password

The --requirepass mysecurepassword command argument enforces authentication on every Redis connection. The same value must be set in CC_REDIS_PASSWORD in .env.

Starting Redis

docker-compose -f docker/redis/docker-compose.yaml up -d

Stopping services

Stop MinIO:
docker-compose -f docker/minio/docker-compose.yaml down
Stop Redis:
docker-compose -f docker/redis/docker-compose.yaml down
To remove the persisted data volumes as well, append --volumes to either command.

Verifying services are running

Check that both containers are up:
docker ps
You should see entries for the MinIO and Redis containers with a status of Up. Perform a quick MinIO health check against the S3 API port:
curl -I http://localhost:9000/minio/health/live
A 200 OK response confirms MinIO is accepting S3 API traffic. For Redis, connect via the CLI:
redis-cli -h 127.0.0.1 -p 6379 -a mysecurepassword ping
A PONG response confirms Redis is ready.

Build docs developers (and LLMs) love