-
Notifications
You must be signed in to change notification settings - Fork 160
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(examples): update docker compose files (#133)
- Loading branch information
Showing
6 changed files
with
54 additions
and
24 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,38 @@ | ||
version: '3' | ||
|
||
# docker exec --interactive --tty kafka-kafka-1 /opt/kafka/bin/kafka-console-producer.sh --bootstrap-server localhost:9092 --topic test | ||
# docker exec --interactive --tty kafka-kafka-1 /opt/kafka/bin/kafka-console-consumer.sh --bootstrap-server localhost:9092 --topic test2 --from-beginning | ||
# docker exec --interactive --tty broker /bin/kafka-console-producer --bootstrap-server localhost:9092 --topic test | ||
# docker exec --interactive --tty broker /bin/kafka-console-consumer --bootstrap-server localhost:9092 --topic test2 --from-beginning | ||
|
||
# https://github.com/confluentinc/cp-all-in-one/blob/7.6.1-post/cp-all-in-one-community/docker-compose.yml | ||
# https://docs.confluent.io/platform/current/installation/versions-interoperability.html | ||
services: | ||
zookeeper: | ||
image: wurstmeister/zookeeper | ||
image: confluentinc/cp-zookeeper:7.6.1 | ||
hostname: zookeeper | ||
container_name: zookeeper | ||
ports: | ||
- "2181:2181" | ||
kafka: | ||
image: wurstmeister/kafka:2.13-2.8.1 | ||
environment: | ||
ZOOKEEPER_CLIENT_PORT: 2181 | ||
ZOOKEEPER_TICK_TIME: 2000 | ||
|
||
broker: | ||
image: confluentinc/cp-kafka:7.6.1 | ||
hostname: broker | ||
container_name: broker | ||
depends_on: | ||
- zookeeper | ||
ports: | ||
- "29092:29092" | ||
- "9092:9092" | ||
- "9101:9101" | ||
environment: | ||
KAFKA_ADVERTISED_HOST_NAME: 127.0.0.1 | ||
KAFKA_CREATE_TOPICS: "test:3:1,test2:3:1" | ||
KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181 | ||
volumes: | ||
- /var/run/docker.sock:/var/run/docker.sock | ||
KAFKA_BROKER_ID: 1 | ||
KAFKA_ZOOKEEPER_CONNECT: 'zookeeper:2181' | ||
KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: PLAINTEXT:PLAINTEXT,PLAINTEXT_HOST:PLAINTEXT | ||
KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://broker:29092,PLAINTEXT_HOST://localhost:9092 | ||
KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1 | ||
KAFKA_TRANSACTION_STATE_LOG_MIN_ISR: 1 | ||
KAFKA_TRANSACTION_STATE_LOG_REPLICATION_FACTOR: 1 | ||
KAFKA_GROUP_INITIAL_REBALANCE_DELAY_MS: 0 | ||
KAFKA_JMX_PORT: 9101 | ||
KAFKA_JMX_HOSTNAME: localhost | ||
AUTO_CREATE_TOPICS: true |
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,36 @@ | ||
version: '3' | ||
# docker exec --interactive --tty pulsar-standalone /pulsar/bin/pulsar-client produce test1 -m "test" -n 10 | ||
# docker exec --interactive --tty pulsar-standalone /pulsar/bin/pulsar-client consume -s sub test2 -n 0 | ||
|
||
services: | ||
standalone: | ||
image: apachepulsar/pulsar | ||
image: apachepulsar/pulsar:3.2.2 | ||
container_name: pulsar-standalone | ||
ports: | ||
- "6650:6650" | ||
expose: | ||
- 8080 | ||
- 6650 | ||
environment: | ||
- PULSAR_MEM=" -Xms512m -Xmx512m -XX:MaxDirectMemorySize=1g" | ||
- BOOKIE_MEM=" -Xms512m -Xmx512m -XX:MaxDirectMemorySize=1g" | ||
command: > | ||
/bin/bash -c | ||
"bin/apply-config-from-env.py conf/standalone.conf | ||
&& bin/pulsar standalone" | ||
networks: | ||
- pulsar-network | ||
|
||
dashboard: | ||
image: apachepulsar/pulsar-dashboard | ||
image: apachepulsar/pulsar-dashboard:2.8.1 | ||
container_name: pulsar-dashboard | ||
depends_on: | ||
- standalone | ||
ports: | ||
- "80:80" | ||
environment: | ||
- SERVICE_URL=http://standalone:8080 | ||
- SERVICE_URL=http://standalone:8080 | ||
networks: | ||
- pulsar-network | ||
|
||
networks: | ||
pulsar-network: | ||
driver: bridge |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
version: '3' | ||
|
||
services: | ||
redis: | ||
image: redis | ||
|
This file contains 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
This file contains 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