version: "3.7" services: app: build: context: ./ dockerfile: ./Dockerfile image: replicator depends_on: - replicator_zookeeper_1 - replicator_zookeeper_2 - replicator_kafka_1 - replicator_kafka_2 volumes: - ./:/app/ command: cargo run --bin=replicator -- --config=fixtures/example_config.yml -p 9445 -h 0.0.0.0 ports: - 9444:9444 - 9445:9445 networks: replicator_rust_env_network: aliases: - replicator-app.test replicator_zookeeper_1: image: wurstmeister/zookeeper ports: - 2181:2181 networks: replicator_rust_env_network: aliases: - replicator-zookeeper-1.test replicator_zookeeper_2: image: wurstmeister/zookeeper ports: - 2182:2181 networks: replicator_rust_env_network: aliases: - replicator-zookeeper-2.test replicator_kafka_1: image: wurstmeister/kafka:2.11-1.1.0 depends_on: - replicator_zookeeper_1 ports: - 9092:9092 environment: #KAFKA_ADVERTISED_HOST_NAME: 127.0.0.1 HOSTNAME_COMMAND: "route -n | awk '/UG[ \t]/{print $$2}'" KAFKA_CREATE_TOPICS: "replicator-logs:1:1,topic1:3:1,topic2:3:1,topic3:3:1" KAFKA_ZOOKEEPER_CONNECT: replicator-zookeeper-1.test:2181 # BROKER_ID_COMMAND: "hostname | awk -F'-' '{print $$2}'" KAFKA_BROKER_ID: 1 volumes: - /var/run/docker.sock:/var/run/docker.sock networks: replicator_rust_env_network: aliases: - replicator-kafka-1.test replicator_kafka_2: image: wurstmeister/kafka:2.11-1.1.0 depends_on: - replicator_zookeeper_2 ports: - 9093:9092 environment: #KAFKA_ADVERTISED_HOST_NAME: 127.0.0.1 HOSTNAME_COMMAND: "route -n | awk '/UG[ \t]/{print $$2}'" KAFKA_CREATE_TOPICS: "replicator-logs:1:1,topic1:3:1,topic2:3:1,topic3:3:1" KAFKA_ZOOKEEPER_CONNECT: replicator-zookeeper-2.test:2181 # BROKER_ID_COMMAND: "hostname | awk -F'-' '{print $$2}'" KAFKA_BROKER_ID: 2 volumes: - /var/run/docker.sock:/var/run/docker.sock networks: replicator_rust_env_network: aliases: - replicator-kafka-2.test replicator_kafkacat: image: edenhill/kafkacat:1.5.0 volumes: - ./:/app/ environment: KAFKA_HOST: replicator-kafka-1.test entrypoint: /bin/sh networks: replicator_rust_env_network: aliases: - replicator-kafkacat-1.test networks: replicator_rust_env_network: