Documentation Index
Fetch the complete documentation index at: https://mintlify.com/theonetrade/backtest-ollama-crontab/llms.txt
Use this file to discover all available pages before exploring further.
backtest-ollama-crontab requires two persistent services to be reachable before the crontab or backtest runner can start: a MongoDB 8.0 instance that stores crawled parser items and screened signals, and a Redis 7.4 instance used as the job queue between the crawler and the signal logic pipeline. Both are provided as single-service Docker Compose stacks under the docker/ directory so you can bring them up with a single command per service.
MongoDB
The MongoDB stack is defined atdocker/mongodb/docker-compose.yaml and runs the official MongoDB Community Server 8.0 image.
docker/mongodb/docker-compose.yaml
Starting MongoDB
restart: always, so it will come back automatically after a system reboot.
What gets created
| Detail | Value |
|---|---|
| Container name | mongodb |
| Exposed port | 27017 → 27017 |
| Data volume | ./mongo_data (relative to docker/mongodb/) |
| Auth | None (unauthenticated, development only) |
Connecting via environment variable
TheCC_MONGO_CONNECTION_STRING environment variable in packages/core points to this instance:
backtest-pro is created automatically on first write. The wtimeoutMS=15000 parameter ensures that a slow or unavailable MongoDB write does not hang the 15-minute crontab.
Redis
The Redis stack is defined atdocker/redis/docker-compose.yaml and runs Redis 7.4 with password authentication enabled.
docker/redis/docker-compose.yaml
Starting Redis
What gets created
| Detail | Value |
|---|---|
| Container name | redis |
| Exposed port | 6379 → 6379 |
| Data volume | ./redis_data (relative to docker/redis/) |
| Password | mysecurepassword |
| ACL user | default |
Connecting via environment variables
The Redis connection inpackages/core is assembled from four separate variables:
Verifying both services
Once both containers are running, confirm they are healthy:Ollama
Ollama does not have a Docker Compose file in this repository. ThegetOllama singleton in packages/core/src/config/ollama.ts connects to the Ollama cloud service at https://ollama.com and authenticates with a bearer token — it does not call a local Ollama process. The risk-filter pipeline calls the gpt-oss:120b model for every parsed signal.
To authenticate, set CC_OLLAMA_TOKEN to your Ollama API key in packages/core/.env:
getOllama singleton always sends Authorization: Bearer <token>. An empty CC_OLLAMA_TOKEN (the default) will be rejected by the Ollama cloud service — you must supply a valid token for the LLM risk filter to function.