Compose the stack
For the complete documentation index see: llms.txt
All documentation pages available in markdown.
Now that you have both configuration files ready, combine them into a Docker Compose stack.
-
Create
docker-compose.ymlin the project directory. This file defines the three services that make up the dispute-search pipeline locally: Aerospike Database, the Elasticsearch connector, and Elasticsearch. A fourthaerospike-toolscontainer lets you simulate authorization-service writes withaql. Thevolumesentries mount theaerospike.confandaerospike-elasticsearch-outbound.ymlfiles you created earlier into their respective containers. On startup, the Aerospike Database and Elasticsearch connector images use these configuration files instead of their default settings.docker-compose.yml name: aerospike-elastic-quickstartservices:aerospike:image: aerospike/aerospike-server-enterprise:8.1.1.0container_name: aerospikevolumes:- ./aerospike.conf:/etc/aerospike/aerospike.template.conf:ro- ./features.conf:/etc/aerospike/features.conf:rohealthcheck:test: ["CMD", "asinfo", "-v", "status"]interval: 5stimeout: 5sretries: 10elasticsearch:image: docker.elastic.co/elasticsearch/elasticsearch:9.5.0container_name: elasticsearchenvironment:- discovery.type=single-node- xpack.security.enabled=false- ES_JAVA_OPTS=-Xms512m -Xmx512mports:- "127.0.0.1:9200:9200"healthcheck:test: ["CMD-SHELL", "curl -sf http://localhost:9200/_cluster/health >/dev/null"]interval: 5stimeout: 5sretries: 20aerospike-elasticsearch-outbound:image: aerospike/aerospike-elasticsearch-outbound:3.0.2container_name: aerospike-elasticsearch-outboundvolumes:- ./aerospike-elasticsearch-outbound.yml:/etc/aerospike-elasticsearch-outbound/aerospike-elasticsearch-outbound.yml:roports:- "127.0.0.1:8902:8902"depends_on:aerospike:condition: service_healthyelasticsearch:condition: service_healthyaerospike-tools:image: aerospike/aerospike-tools:13.0.1container_name: aerospike-toolsdepends_on:aerospike:condition: service_healthyentrypoint: ["sleep", "infinity"]The connector’s
depends_onhealth checks make it wait for both Aerospike and Elasticsearch, so it never tries to ship a dispute record before Elasticsearch can index it. -
Validate the Compose file.
Terminal docker compose config --quietThe command exits without output when the file is valid.
aerospike.confmounts to/etc/aerospike/aerospike.template.conf, not/etc/aerospike/aerospike.conf, because the Aerospike image renders the template into its final configuration file at startup.aerospike-elasticsearch-outbound.ymlmounts directly to the path the Elasticsearch connector reads on startup, with no rendering step.