Kafkatorio/modules/infra-kafka-cluster/src/docker-compose.yml
Lazzexus cae2eb09c6 Fix Docker image builds and local platform setup
Getting the backend running locally in Docker surfaced several issues:

- geedeecee: REGISTRY_HOST came from the unset Gradle property
  'dockerContainerRegistryHost'. A missing value in a MapProperty makes
  the whole map absent, so every generated .env was empty and all
  docker-compose builds failed. Default it to 'localhost'.
- kafka image: dlcdn.apache.org only hosts current releases, so Kafka
  3.3.1 404s. Use archive.apache.org. Replace the deprecated openjdk:11
  base with eclipse-temurin:11-jre, bump the download stage from EOL
  Debian 11 to 12, and drop 'COPY --chmod' so the image builds without
  BuildKit/buildx.
- web-map: the map calls the API and websocket on its own origin
  (/kafkatorio/...), which previously relied on an external reverse
  proxy. Proxy /kafkatorio/ to events-server-web in the map's nginx so
  one port serves everything, and publish that port in the example
  platform compose file.
- docs: the example secret config mapped server IDs to descriptions,
  but the schema is token (JWT 'sub') -> server ID, and both must match
  [a-zA-Z0-9-_]. Descriptions with spaces crashed every service.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 17:27:11 +02:00

99 lines
2.8 KiB
YAML

version: "3.9"
services:
kafka:
image: ${REGISTRY_HOST}/${APP_GROUP}/${APP_NAME}:${KAFKATORIO_VERSION}
container_name: "kafka"
restart: "unless-stopped"
build:
dockerfile: "kafka.Dockerfile"
context: "."
target: "kafka-kraft"
args:
KAFKA_DL_URL: "https://archive.apache.org/dist/kafka/${KAFKA_VERSION}/kafka_2.13-${KAFKA_VERSION}.tgz"
volumes:
- "./kafka-server.properties:/kafka/server.properties"
# - "./kafka-data:/tmp/kraft-combined-logs" # see Dockerfile
environment:
JMX_PORT: "9991"
# KAFKA_JMX_OPTS: "9991"
KAFKA_JMX_OPTS: "-Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -Djava.rmi.server.hostname=kafka -Dcom.sun.management.jmxremote.rmi.port=9991"
networks:
- "kafka-nw"
- "kafkatorio-nw"
ports:
# note: other Docker containers should use 29092
- "9092:9092"
- "9093:9093"
kafka-ui:
image: provectuslabs/kafka-ui:v0.4.0
container_name: "kafka-ui"
restart: "unless-stopped"
networks:
- "kafka-nw"
- "traefik-nw"
labels:
- "traefik.enable=true"
ports:
- "18090:8080"
environment:
KAFKA_CLUSTERS_0_NAME: "${COMPOSE_PROJECT_NAME}"
KAFKA_CLUSTERS_0_BOOTSTRAPSERVERS: "kafka:29092"
KAFKA_CLUSTERS_0_KAFKACONNECT_0_NAME: "kafkatorio-connect"
KAFKA_CLUSTERS_0_KAFKACONNECT_0_ADDRESS: "http://connect:8083"
# - KAFKA_CLUSTERS_0_ZOOKEEPER=kafka:9093
# grafana:
# image: "grafana/grafana:${GRAFANA_VERSION}"
# container_name: "grafana"
# ports:
# - "3000:3000"
# environment:
# GF_PATHS_DATA : /var/lib/grafana
# GF_SECURITY_ADMIN_PASSWORD : kafka
# volumes:
# - "./config/grafana/provisioning:/etc/grafana/provisioning"
# - "./config/grafana/dashboards:/var/lib/grafana/dashboards"
# depends_on:
# - prometheus
# networks:
# - "kafka-nw"
#
# prometheus:
# image: "prom/prometheus:${PROMETHEUS_VERSION}"
# container_name: "prometheus"
# ports:
# - "9090:9090"
# volumes:
# - "./config/prometheus.yml:/etc/prometheus/prometheus.yml"
# command: "--config.file=/etc/prometheus/prometheus.yml"
# networks:
# - "kafka-nw"
#
# jmx-kafka:
# image: "sscaling/jmx-prometheus-exporter"
# container_name: "jmx-kafka"
# ports:
# - "5556:5556"
# environment:
# CONFIG_YML : "/etc/jmx_exporter/config.yml"
## JVM_OPTS: "-XX:MaxRAMPercentage=70.0"
# volumes:
# - "./config/jmx_exporter_kafka_broker.yml:/etc/jmx_exporter/config.yml"
# depends_on:
# - kafka
# networks:
# - "kafka-nw"
networks:
kafka-nw:
name: "kafka-nw"
kafkatorio-nw:
name: "kafkatorio-nw"
traefik-nw:
name: "traefik-nw"
external: true