Skip to content

Commit bf6c349

Browse files
authored
added FAQ to change ports
this fixes #32
1 parent c5b3bd6 commit bf6c349

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

README.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,3 +122,29 @@ A: Add the following line to your docker-compose environment variables: `KAFKA_L
122122

123123
Q: How do I delete data to start fresh?
124124
A: Your data is persisted from within the docker compose folder, so if you want for example to reset the data in the full-stack docker compose, first do a `docker-compose -f full-stack.yml down`, then remove the directory `full-stack`, for example by doing `rm -r -f full-stack`.
125+
126+
Q: Can I change the zookeeper ports?
127+
A: yes. Say you want to change `zoo1` port to `12181` (only relevant lines are shown):
128+
```
129+
zoo1:
130+
ports:
131+
- "12181:12181"
132+
environment:
133+
ZOO_PORT: 12181
134+
135+
kafka1:
136+
environment:
137+
KAFKA_ZOOKEEPER_CONNECT: "zoo1:12181"
138+
```
139+
140+
Q: Can I change the Kafka ports?
141+
A: yes. Say you want to change `kafka1` port to `12345` (only relevant lines are shown). Note only `LISTENER_DOCKER_EXTERNAL` changes:
142+
```
143+
kafka1:
144+
image: confluentinc/cp-kafka:5.0.0
145+
hostname: kafka1
146+
ports:
147+
- "12345:12345"
148+
environment:
149+
KAFKA_ADVERTISED_LISTENERS: LISTENER_DOCKER_INTERNAL://kafka1:19092,LISTENER_DOCKER_EXTERNAL://${DOCKER_HOST_IP:-127.0.0.1}:12345
150+
```

0 commit comments

Comments
 (0)