|
1 | | -version: "3.8" |
2 | | - |
| 1 | +version: '3.7' |
3 | 2 | services: |
4 | | - zookeeper: |
5 | | - image: confluentinc/cp-zookeeper |
6 | | - hostname: zookeeper |
7 | | - ports: |
8 | | - - 2182:2181 |
9 | | - environment: |
10 | | - SERVICE_NAME: zookeeper |
11 | | - ZOOKEEPER_CLIENT_PORT: 2181 |
12 | | - |
13 | | - kafka: |
14 | | - image: confluentinc/cp-kafka:latest |
15 | | - hostname: localhost |
| 3 | + # Redpanda cluster |
| 4 | + redpanda-1: |
| 5 | + image: docker.redpanda.com/redpandadata/redpanda:v23.1.1 |
| 6 | + container_name: redpanda-1 |
| 7 | + command: |
| 8 | + - redpanda |
| 9 | + - start |
| 10 | + - --smp |
| 11 | + - '1' |
| 12 | + - --reserve-memory |
| 13 | + - 0M |
| 14 | + - --overprovisioned |
| 15 | + - --node-id |
| 16 | + - '1' |
| 17 | + - --kafka-addr |
| 18 | + - PLAINTEXT://0.0.0.0:29092,OUTSIDE://0.0.0.0:9092 |
| 19 | + - --advertise-kafka-addr |
| 20 | + - PLAINTEXT://redpanda-1:29092,OUTSIDE://localhost:9092 |
| 21 | + - --pandaproxy-addr |
| 22 | + - PLAINTEXT://0.0.0.0:28082,OUTSIDE://0.0.0.0:8082 |
| 23 | + - --advertise-pandaproxy-addr |
| 24 | + - PLAINTEXT://redpanda-1:28082,OUTSIDE://localhost:8082 |
| 25 | + - --rpc-addr |
| 26 | + - 0.0.0.0:33145 |
| 27 | + - --advertise-rpc-addr |
| 28 | + - redpanda-1:33145 |
16 | 29 | ports: |
| 30 | + # - 8081:8081 |
| 31 | + - 8082:8082 |
17 | 32 | - 9092:9092 |
18 | | - links: |
19 | | - - zookeeper:zookeeper |
| 33 | + - 9644:9644 |
| 34 | + - 28082:28082 |
| 35 | + - 29092:29092 |
| 36 | + |
| 37 | + # Want a two node Redpanda cluster? Uncomment this block :) |
| 38 | + # redpanda-2: |
| 39 | + # image: docker.redpanda.com/redpandadata/redpanda:v23.1.1 |
| 40 | + # container_name: redpanda-2 |
| 41 | + # command: |
| 42 | + # - redpanda |
| 43 | + # - start |
| 44 | + # - --smp |
| 45 | + # - '1' |
| 46 | + # - --reserve-memory |
| 47 | + # - 0M |
| 48 | + # - --overprovisioned |
| 49 | + # - --node-id |
| 50 | + # - '2' |
| 51 | + # - --seeds |
| 52 | + # - redpanda-1:33145 |
| 53 | + # - --kafka-addr |
| 54 | + # - PLAINTEXT://0.0.0.0:29093,OUTSIDE://0.0.0.0:9093 |
| 55 | + # - --advertise-kafka-addr |
| 56 | + # - PLAINTEXT://redpanda-2:29093,OUTSIDE://localhost:9093 |
| 57 | + # - --pandaproxy-addr |
| 58 | + # - PLAINTEXT://0.0.0.0:28083,OUTSIDE://0.0.0.0:8083 |
| 59 | + # - --advertise-pandaproxy-addr |
| 60 | + # - PLAINTEXT://redpanda-2:28083,OUTSIDE://localhost:8083 |
| 61 | + # - --rpc-addr |
| 62 | + # - 0.0.0.0:33146 |
| 63 | + # - --advertise-rpc-addr |
| 64 | + # - redpanda-2:33146 |
| 65 | + # ports: |
| 66 | + # - 8083:8083 |
| 67 | + # - 9093:9093 |
| 68 | + |
| 69 | + # redpanda-3: |
| 70 | + # image: docker.redpanda.com/redpandadata/redpanda:v23.1.1 |
| 71 | + # container_name: redpanda-3 |
| 72 | + # command: |
| 73 | + # - redpanda |
| 74 | + # - start |
| 75 | + # - --smp |
| 76 | + # - '2' |
| 77 | + # - --reserve-memory |
| 78 | + # - 0M |
| 79 | + # - --overprovisioned |
| 80 | + # - --node-id |
| 81 | + # - '3' |
| 82 | + # - --seeds |
| 83 | + # - redpanda-1:33145 |
| 84 | + # - --kafka-addr |
| 85 | + # - PLAINTEXT://0.0.0.0:29094,OUTSIDE://0.0.0.0:9094 |
| 86 | + # - --advertise-kafka-addr |
| 87 | + # - PLAINTEXT://redpanda-3:29094,OUTSIDE://localhost:9094 |
| 88 | + # - --pandaproxy-addr |
| 89 | + # - PLAINTEXT://0.0.0.0:28084,OUTSIDE://0.0.0.0:8084 |
| 90 | + # - --advertise-pandaproxy-addr |
| 91 | + # - PLAINTEXT://redpanda-3:28084,OUTSIDE://localhost:8084 |
| 92 | + # - --rpc-addr |
| 93 | + # - 0.0.0.0:33147 |
| 94 | + # - --advertise-rpc-addr |
| 95 | + # - redpanda-3:33147 |
| 96 | + # ports: |
| 97 | + # - 8084:8084 |
| 98 | + # - 9094:9094 |
| 99 | + |
| 100 | + redpanda-console: |
| 101 | + image: docker.redpanda.com/redpandadata/console:v2.2.2 |
| 102 | + container_name: redpanda-console |
| 103 | + entrypoint: /bin/sh |
| 104 | + command: -c "echo \"$$CONSOLE_CONFIG_FILE\" > /tmp/config.yml; /app/console" |
20 | 105 | environment: |
21 | | - KAFKA_ZOOKEEPER_CONNECT: "zookeeper:2181" |
22 | | - KAFKA_ADVERTISED_LISTENERS: "PLAINTEXT://$KAFKA_TEST_BROKER:9092" |
23 | | - KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1 |
24 | | - KAFKA_CREATE_TOPICS: |
| 106 | + CONFIG_FILEPATH: /tmp/config.yml |
| 107 | + CONSOLE_CONFIG_FILE: | |
| 108 | + kafka: |
| 109 | + brokers: ["redpanda-1:29092"] |
| 110 | + schemaRegistry: |
| 111 | + enabled: false |
| 112 | + redpanda: |
| 113 | + adminApi: |
| 114 | + enabled: true |
| 115 | + urls: ["http://redpanda-1:9644"] |
| 116 | + connect: |
| 117 | + enabled: false |
| 118 | + ports: |
| 119 | + - 8080:8080 |
| 120 | + depends_on: |
| 121 | + - redpanda-1 |
0 commit comments