Skip to content

Instantly share code, notes, and snippets.

@trbngr
Created April 12, 2023 22:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save trbngr/f08d431c7bcb26df913bbe527311df8f to your computer and use it in GitHub Desktop.
Save trbngr/f08d431c7bcb26df913bbe527311df8f to your computer and use it in GitHub Desktop.
Redpanda Local Docker
---
version: '3.7'
name: redpanda-quickstart
networks:
redpanda_network:
driver: bridge
volumes:
redpanda-0:
services:
redpanda-0:
command:
- redpanda
- start
- --kafka-addr internal://0.0.0.0:9092,external://0.0.0.0:19092
# Address the broker advertises to clients that connect to the Kafka API.
# Use the internal addresses to connect to the Redpanda brokers'
# from inside the same Docker network.
# Use the external addresses to connect to the Redpanda brokers'
# from outside the Docker network.
- --advertise-kafka-addr internal://redpanda-0:9092,external://localhost:19092
- --pandaproxy-addr internal://0.0.0.0:8082,external://0.0.0.0:18082
# Address the broker advertises to clients that connect to the HTTP Proxy.
- --advertise-pandaproxy-addr internal://redpanda-0:8082,external://localhost:18082
- --schema-registry-addr internal://0.0.0.0:8081,external://0.0.0.0:18081
# Redpanda brokers use the RPC API to communicate with eachother internally.
- --rpc-addr redpanda-0:33145
- --advertise-rpc-addr redpanda-0:33145
# Tells Seastar (the framework Redpanda uses under the hood) to use 1 core on the system.
- --smp 1
# The amount of memory to make available to Redpanda.
- --memory 2G
# Mode dev-container uses well-known configuration properties for development in containers.
- --mode dev-container
# enable logs for debugging.
- --default-log-level=debug
image: docker.redpanda.com/redpandadata/redpanda:v23.1.2
container_name: redpanda-0
volumes:
- redpanda-0:/var/lib/redpanda/data
- ./priv/redpanda:/tmp/pandapost_integration
networks:
- redpanda_network
ports:
- 18081:18081
- 18082:18082
- 19092:19092
- 19644:9644
connect:
build: ./priv/kafka_connect
networks:
- redpanda_network
depends_on:
- redpanda-0
ports:
- 8083:8083
environment:
BOOTSTRAP_SERVERS: "redpanda-0:9092"
GROUP_ID: "1"
KEY_CONVERTER: io.confluent.connect.avro.AvroConverter
VALUE_CONVERTER: io.confluent.connect.avro.AvroConverter
CONFIG_STORAGE_TOPIC: "inventory.configs"
OFFSET_STORAGE_TOPIC: "inventory.offset"
STATUS_STORAGE_TOPIC: "inventory.status"
console:
container_name: redpanda-console
image: docker.redpanda.com/vectorized/console:v2.2.2
networks:
- redpanda_network
entrypoint: /bin/sh
command: -c 'echo "$$CONSOLE_CONFIG_FILE" > /tmp/config.yml; /app/console'
environment:
CONFIG_FILEPATH: /tmp/config.yml
CONSOLE_CONFIG_FILE: |
kafka:
brokers: ["redpanda-0:9092"]
schemaRegistry:
enabled: true
urls: ["http://redpanda-0:8081"]
redpanda:
adminApi:
enabled: true
urls: ["http://redpanda-0:9644"]
connect:
enabled: true
clusters:
- name: legacy
url: http://connect:8083
ports:
- 8080:8080
depends_on:
- redpanda-0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment