Ready-to-run Docker examples for various ReadonlyREST deployments with Elasticsearch and Kibana.
- Docker with
docker composeplugin - A ReadonlyREST activation key (only for examples that require a PRO or ENT license — you will be prompted when needed)
Windows users: use WSL (recommended) or Git Bash. PowerShell is not supported.
Run any example with a single command (no clone needed):
curl -sL https://raw.githubusercontent.com/beshu-tech/readonlyrest-examples/master/quickstart.sh | bashOr pass the example name directly:
curl -sL https://raw.githubusercontent.com/beshu-tech/readonlyrest-examples/master/quickstart.sh | bash -s basic-multitenancySome examples require a ReadonlyREST PRO or ENT activation key. If needed, you will be prompted to enter it. You can also set it once as an environment variable:
export ROR_ACTIVATION_KEY="your-key-here"To stop and clean up:
curl -sL https://raw.githubusercontent.com/beshu-tech/readonlyrest-examples/master/quickstart.sh | bash -s -- --cleanIf you already have the repo cloned:
./run.shOr with an example name:
./run.sh basic-multitenancyTo stop and clean up:
./clean.sh| Example | Description |
|---|---|
| basic-multitenancy | Multi-tenancy: isolated Kibana spaces and index access per user |
| kibana-reverse-proxy | Two Kibana nodes behind an Apache HTTPS reverse proxy with sticky-session load balancing, SSL termination, and a configurable base-path rewriting strategy |
| fleet | Full Elastic Fleet stack: Fleet Server, Elastic Agent with APM, and an instrumented Node.js service, all secured with ReadonlyREST |
examples/ # One directory per example
basic-multitenancy/
.env # ES/KBN/ReadonlyREST versions and Dockerfile choice (optional)
confs/ # elasticsearch.yml, kibana.yml, readonlyrest.yml
scripts/ # Lifecycle scripts: init.sh (data seeding), post-start.sh (optional)
kibana-reverse-proxy/
.env
confs/ # elasticsearch.yml, kibana.yml, readonlyrest.yml
docker-compose.override.yml # Additional services (reverse proxy)
images/ # Dockerfiles for example-specific services
scripts/ # init.sh, post-start.sh
runner/ # Shared Docker infrastructure (used by all examples)
run.sh # Main entry point
clean.sh # Stop and remove containers
docker-compose.yml
templates/
kbn-instance.yml.tpl # Compose service template; one copy rendered per KBN_INSTANCES value
images/ # Dockerfiles for ES, KBN, and cluster-initializer
conf/ # TLS certs and shared config (log4j2, keystores)
utils/
setup-compose-files.sh # Assembles the final list of -f flags passed to docker compose
generate-kbn-instances.sh # Renders kbn-instance.yml.tpl for each Kibana instance
... # Version collection, license detection, etc.
run.sh <example> validates the example directory, copies its .env (if present) into the environment, detects the ReadonlyREST license edition, and launches the cluster via docker compose. Config files from the example's confs/ directory are volume-mounted into the containers at runtime. The example's README.md title and first paragraph are printed at startup to identify what is being run.
If no .env is provided, the script falls back to interactive prompts to collect ES/KBN version info.
Setting KBN_INSTANCES=N in an example's .env spins up N Kibana nodes. The runner renders runner/templates/kbn-instance.yml.tpl once per instance, assigning each a unique service name (kbn-ror, kbn-ror-2, …) and host port (15601, 15602, …). The generated Compose fragment is merged into the final docker compose invocation automatically — no manual edits to any Compose file are needed.
If an example provides scripts/kibana-conf-extra-settings.sh, the runner appends its stdout to confs/kibana.yml before mounting the file into the container. Use this to inject settings that depend on runtime environment variables (e.g. server.rewriteBasePath) without duplicating the base config.
- Create a directory under
examples/(e.g.examples/my-example) - Add the required config files:
confs/elasticsearch.ymlconfs/readonlyrest.ymlconfs/kibana.yml
- Add a
README.mdwith a title (# My Example) and a short description paragraph — these are printed at startup - Optionally add a
.envto pin ES/KBN/ReadonlyREST versions (seeexamples/basic/.envfor the format)- Set
KBN_INSTANCES=Nto start N Kibana nodes instead of one
- Set
- Optionally add
scripts/init.shto seed data after the cluster starts (it cansource /usr/local/lib/ror-utils.shfor helper functions likecreateIndex,putDocument, etc.) - Optionally add
scripts/post-start.shto print custom access instructions or run post-startup steps; if absent, the default Kibana URL is printed - Optionally add
scripts/kibana-conf-extra-settings.shto emit extrakibana.ymllines at runtime (its stdout is appended toconfs/kibana.ymlbefore the container starts) - Optionally add
docker-compose.override.ymlto define extra services (e.g. a reverse proxy); it is automatically picked up and merged with the base compose file - Run it:
./run.sh my-example