Last active
February 20, 2025 13:00
-
-
Save CHERTS/34c62e552c70946ee9254c42ed31c50c to your computer and use it in GitHub Desktop.
Redpanda + Redpanda console docker-compose file (one node host)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
services: | |
redpanda: | |
image: docker.redpanda.com/redpandadata/redpanda:v24.2.5 | |
container_name: redpanda | |
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: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: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 each other internally. | |
- --rpc-addr redpanda:33145 | |
- --advertise-rpc-addr redpanda:33145 | |
# Mode dev-container uses well-known configuration properties for development in containers. | |
- --mode dev-container | |
# Tells Seastar (the framework Redpanda uses under the hood) to use 1 core on the system. | |
- --smp 1 | |
- --default-log-level=info | |
volumes: | |
- redpanda:/var/lib/redpanda/data | |
networks: | |
- redpanda_network | |
ports: | |
- 18081:18081 | |
- 18082:18082 | |
- 19092:19092 | |
- 19644:9644 | |
console: | |
container_name: redpanda-console | |
image: docker.redpanda.com/redpandadata/console:v2.7.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:9092"] | |
schemaRegistry: | |
enabled: true | |
urls: ["http://redpanda:8081"] | |
redpanda: | |
adminApi: | |
enabled: true | |
urls: ["http://redpanda:9644"] | |
ports: | |
- 8080:8080 | |
depends_on: | |
- redpanda | |
networks: | |
redpanda_network: | |
driver: bridge | |
volumes: | |
redpanda: | |
driver: local | |
driver_opts: | |
o: bind | |
type: rw | |
device: ${PWD}/redpanda_data |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Start Redpanda
Stop Redpanda
Open Redpanda console in Web-browser: