Running Elasticsearch in Docker with prorm
Read this page in the documentation
Running Elasticsearch in Docker with prorm prorm reaches Elasticsearch through ElasticsearchStore, a search implementation of the NoSqlStore interface. Documents are indexed and queried with Elasticsearch's own DSL rather than SQL. Start the container A single node with security disabled is the simplest local setup: ESJAVAOPTS matters — the default heap is far larger than a laptop or CI runner wants, and the container is killed by the OOM reaper without it. Waiting for readiness Elasticsearch is among the slowest to start. Wait for a usable cluster status, not just an open port: A single node cannot allocate replicas, so it reports yellow, not green. Waiting for green will hang forever. Dependencies Connect and use the store That refresh call is the single most common source of flaky Elasticsearch tests: a document is not searchable the instant index() resolves. In production, rely on the default one-second refresh interval instead of forcing it. Tear down Troubleshooting Symptom | Cause | --- | --- | Container exits immediately, code 137 | OOM-killed. Set ESJAVAOPTS as above. | max virtual memory areas vm.maxmapcount [65530] is too low | Linux host needs sysctl -w vm.maxmapcount=262144. | Health never reaches green | Expected on one node — wait for yellow. | securityexception | Security is on by default in 8.x; disable it or supply credentials. | Document indexed but not found | Needs a refresh — see above. | Related reading NoSQL stores overview — the full store index elasticsearch — the store's own API notes, in the repository