# Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not use this file except in compliance with # the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # Single-node AutoMQ setup with MinIO for quick starts version: "3.8" services: # MinIO service for S3 storage minio: container_name: "minio" image: minio/minio:RELEASE.2025-05-24T17-08-30Z environment: - MINIO_ROOT_USER=minioadmin - MINIO_ROOT_PASSWORD=minioadmin - MINIO_DOMAIN=minio ports: - "9000:9000" # MinIO API - "9001:9001" # MinIO Console command: [ "server", "/data", "--console-address", ":9001" ] networks: automq_net: healthcheck: test: [ "CMD", "curl", "-f", "http://minio:9000/minio/health/live" ] interval: 5s timeout: 5s retries: 3 # Create needed buckets mc: container_name: "mc" image: minio/mc:RELEASE.2025-05-21T01-59-54Z depends_on: minio: condition: service_healthy entrypoint: > /bin/sh -c " until (/usr/bin/mc alias set minio http://minio:9000 minioadmin minioadmin) do echo '...waiting...' && sleep 1; done; /usr/bin/mc rm -r --force minio/automq-data; /usr/bin/mc rm -r --force minio/automq-ops; /usr/bin/mc mb minio/automq-data; /usr/bin/mc mb minio/automq-ops; /usr/bin/mc anonymous set public minio/automq-data; /usr/bin/mc anonymous set public minio/automq-ops; tail -f /dev/null " networks: - automq_net # Single node with combined controller and broker roles server1: container_name: "automq-single-server" image: automqinc/automq:1.6.0 stop_grace_period: 1m environment: - KAFKA_S3_ACCESS_KEY=minioadmin - KAFKA_S3_SECRET_KEY=minioadmin - KAFKA_HEAP_OPTS=-Xms1g -Xmx4g -XX:MetaspaceSize=96m -XX:MaxDirectMemorySize=1G # Replace CLUSTER_ID with a unique base64 UUID using "bin/kafka-storage.sh random-uuid" - CLUSTER_ID=3D4fXN-yS1-vsQ8aJ_q4Mg command: - bash - -c - | /opt/automq/kafka/bin/kafka-server-start.sh \ /opt/automq/kafka/config/kraft/server.properties \ --override cluster.id=$$CLUSTER_ID \ --override node.id=0 \ --override controller.quorum.voters=0@server1:9093 \ --override controller.quorum.bootstrap.servers=server1:9093 \ --override advertised.listeners=PLAINTEXT://server1:9092 \ --override s3.data.buckets='0@s3://automq-data?region=us-east-1&endpoint=http://minio:9000&pathStyle=true' \ --override s3.ops.buckets='1@s3://automq-ops?region=us-east-1&endpoint=http://minio:9000&pathStyle=true' \ --override s3.wal.path='0@s3://automq-data?region=us-east-1&endpoint=http://minio:9000&pathStyle=true' networks: automq_net: depends_on: - minio - mc networks: automq_net: name: automq_net driver: bridge ipam: driver: default config: - subnet: "10.6.0.0/16" gateway: "10.6.0.1"