Deploying a ManticoreSearch App
Introduction
ManticoreSearch is an open-source fast search engine with SQL and JSON/HTTP interfaces. Deploying ManticoreSearch with a Dockerfile on Klutch.sh gives you reproducible builds, managed secrets, and persistent storage for indexes—all managed from klutch.sh/app. This guide covers installation, repository prep, a production-ready Dockerfile, deployment steps, Nixpacks overrides, sample queries, and production tips.
Prerequisites
- A Klutch.sh account (create one)
- A GitHub repository containing your ManticoreSearch config (GitHub is the only supported git source)
- Docker familiarity and basic search configuration knowledge
- Storage for indexes and logs
For onboarding, see the Quick Start.
Architecture and ports
- ManticoreSearch serves TCP on
9306(MySQL-compatible) and HTTP on9308. Set the internal container port to9308for HTTP traffic on Klutch.sh; expose9306via a separate TCP app if needed (external8000). - Persistent storage is required for
/var/lib/manticoreto store indexes and data.
Repository layout
manticore/├── Dockerfile # Must be at repo root for auto-detection├── manticore.conf # Configuration file├── data/ # Index storage (mount as volume)└── README.mdKeep secrets out of Git; store them in Klutch.sh environment variables.
Installation (local) and starter commands
Test ManticoreSearch locally before pushing to GitHub:
docker run --rm -p 9308:9308 -p 9306:9306 \ -v $(pwd)/manticore.conf:/etc/manticoresearch/manticore.conf \ -v $(pwd)/data:/var/lib/manticore \ manticoresearch/manticore:6.2.10Optional helper start.sh for portability and Nixpacks fallback:
#!/usr/bin/env bashset -euo pipefailexec searchd --config /etc/manticoresearch/manticore.conf --consoleMake it executable with chmod +x start.sh.
Dockerfile for ManticoreSearch (production-ready)
Place this Dockerfile at the repo root; Klutch.sh auto-detects it (no Docker selection in the UI):
FROM manticoresearch/manticore:6.2.10
WORKDIR /etc/manticoresearch
COPY manticore.conf /etc/manticoresearch/manticore.conf
EXPOSE 9308 9306CMD ["searchd", "--config", "/etc/manticoresearch/manticore.conf", "--console"]Notes:
- Pin the image tag for reproducible builds.
- Adjust config paths to match your repository layout.
Environment variables (Klutch.sh)
Set these in the Klutch.sh app settings (Secrets tab) before deploying:
PORT=9308MANTICORE_CONFIG=/etc/manticoresearch/manticore.confMANTICORE_HTTP_PORT=9308(if referenced in config)MANTICORE_TCP_PORT=9306(if you expose MySQL-compatible port via TCP app)
If you deploy without the Dockerfile and need Nixpacks overrides:
NIXPACKS_BUILD_CMD="echo ManticoreSearch uses prebuilt image"NIXPACKS_START_CMD=searchd --config /etc/manticoresearch/manticore.conf --consoleNIXPACKS_GO_VERSION=1.21(not required for Manticore, provided for completeness)
Attach persistent volumes
In Klutch.sh storage settings, add mount paths and sizes (no names required):
/var/lib/manticore— required for indexes and data./etc/manticoresearch— optional if you edit configs at runtime.
Ensure these paths are writable inside the container.
Deploy ManticoreSearch on Klutch.sh (Dockerfile workflow)
- Push your repository (with the Dockerfile at the root) to GitHub.
- Open klutch.sh/app, create a project, and add an app.
- Connect the GitHub repository; Klutch.sh automatically detects the Dockerfile.
- Choose HTTP traffic for the HTTP API and set the internal port to
9308. - Add the environment variables above (config path, ports, and any
NIXPACKS_*overrides if you temporarily deploy without the Dockerfile). - Attach persistent volumes for
/var/lib/manticore(and/etc/manticoresearchif used), selecting sizes that fit your data and retention needs. - Deploy. Your HTTP API will be reachable at
https://example-app.klutch.sh; attach a custom domain if desired.
If you need the MySQL-compatible port, create a separate Klutch.sh TCP app with internal port 9306 and connect clients to example-app.klutch.sh:8000.
Sample queries
Create an index and insert/query data via HTTP:
curl -X POST "https://example-app.klutch.sh/sql" \ -H "Content-Type: application/json" \ -d '{"query":"CREATE TABLE IF NOT EXISTS demo(title text)"}'
curl -X POST "https://example-app.klutch.sh/sql" \ -H "Content-Type: application/json" \ -d '{"query":"INSERT INTO demo(title) VALUES (\"hello from Klutch.sh\")"}'
curl -X POST "https://example-app.klutch.sh/sql" \ -H "Content-Type: application/json" \ -d '{"query":"SELECT * FROM demo"}'Health checks and production tips
- Add a reverse proxy probe to
/sqlwith a lightweight query for health monitoring. - Enforce HTTPS at the edge; forward HTTP to port 9308 internally.
- Pin image tags and test upgrades in a staging environment.
- Monitor disk usage on
/var/lib/manticoreand resize volumes before they fill. - Tune config (retention, RAM, index settings) for your dataset size and query patterns.
ManticoreSearch on Klutch.sh combines reproducible Docker builds with managed secrets, durable storage for indexes, and flexible HTTP/TCP routing. With the Dockerfile at the repo root and ports set to 9308 (and optional 9306 via TCP), you can run fast, scalable search without extra YAML or workflow overhead.