diff --git a/docker-compose.full.yml b/docker-compose.full.yml index 3bd93c631a..a7a82e9e54 100644 --- a/docker-compose.full.yml +++ b/docker-compose.full.yml @@ -192,6 +192,8 @@ services: image: nats:${DC_NATS_VERSION:-2.10.6} profiles: - default + command: + - '--js' ports: - '4222:4222' - '8222:8222' @@ -199,6 +201,27 @@ services: networks: - primary + kafka: + image: bitnami/kafka:3.7.0 + profiles: + - default + environment: + KAFKA_ENABLE_KRAFT: yes + KAFKA_CFG_PROCESS_ROLES: controller,broker + KAFKA_CFG_CONTROLLER_LISTENER_NAMES: CONTROLLER + KAFKA_CFG_LISTENERS: PLAINTEXT://:9092,CONTROLLER://:9093 + KAFKA_CFG_LISTENER_SECURITY_PROTOCOL_MAP: CONTROLLER:PLAINTEXT,PLAINTEXT:PLAINTEXT + KAFKA_CFG_CONTROLLER_QUORUM_VOTERS: 1@kafka:9093 + KAFKA_CFG_TRANSACTION_PARTITION_VERIFICATION_ENABLE: false + KAFKA_CFG_ADVERTISED_LISTENERS: PLAINTEXT://kafka:9092 + KAFKA_CFG_NODE_ID: 1 + ALLOW_PLAINTEXT_LISTENER: yes + KAFKA_KRAFT_CLUSTER_ID: XkpGZQ27R3eTl3OdTm2LYA # 16 byte base64-encoded UUID + ports: + - '9092:9092' + networks: + - primary + # Cosmo Platform cdn: @@ -322,12 +345,13 @@ services: HTTPS_PROXY: ${HTTPS_PROXY} HTTP_PROXY: ${HTTP_PROXY} NO_PROXY: ${NO_PROXY} + NATS_URL: "nats://nats:4222" restart: on-failure volumes: # Mount the example config from the repo into the working dir of the router binary location # In order apply changes to the config, you need to restart the router container # docker compose -f docker-compose.full.yml --profile router restart router - - ./router/config.yaml:/config.yaml + - ./router/full-demo.config.yaml:/config.yaml networks: - primary profiles: diff --git a/router/config.yaml b/router/config.yaml deleted file mode 100644 index 44e91f5c12..0000000000 --- a/router/config.yaml +++ /dev/null @@ -1,6 +0,0 @@ -# yaml-language-server: $schema=./pkg/config/config.schema.json - -# See pkg/config/config.go for the full list of configuration options. -# This file is used to debugging purposes only. - -version: "1" \ No newline at end of file diff --git a/router/full-demo.config.yaml b/router/full-demo.config.yaml new file mode 100644 index 0000000000..6bbffa6b77 --- /dev/null +++ b/router/full-demo.config.yaml @@ -0,0 +1,18 @@ +# yaml-language-server: $schema=./pkg/config/config.schema.json + +# See pkg/config/config.go for the full list of configuration options. +# This file is used for the demo environment + +version: "1" + +events: + providers: + nats: + - id: default + url: "nats://nats:4222" + - id: my-nats + url: "nats://nats:4222" + kafka: + - id: my-kafka + brokers: + - "kafka:9092" \ No newline at end of file