-
Notifications
You must be signed in to change notification settings - Fork 25
Add Docker Compose Quickstart #99
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 1 commit
Commits
Show all changes
23 commits
Select commit
Hold shift + click to select a range
4385e86
Add Docker Compose Quickstart
rubensf 86eee53
add pg tag and reduce test lines
rubensf 0242e30
reduce test lines
rubensf 708df1d
add minio tag and top level comments
rubensf c419c01
remove akhq from docker compose to reduce LOC and simplify the file
rubensf 00cb0f1
add minio tag
rubensf d36da02
rename pg values and shorten healthcheck
rubensf 2c3e985
readd pg port
rubensf 7e69d57
use host network
rubensf 4dffec0
docs and comments
rubensf 0f68875
rename folder
rubensf a4216cd
typo
rubensf 2612285
trim minio options
rubensf f663e43
renamed docker compose folder
rubensf d7dec3b
rm accidental qkhqh
rubensf b76b64d
rm qucikstart references
rubensf 457248c
rm some comments
rubensf 39521b5
Checkpoint: minimizing LOC
jrinehart-buf 752099b
Checkpoint: some TODOs
jrinehart-buf a987c43
Faster startup and improved healthchecks
jrinehart-buf a0a90da
Minor consistency
jrinehart-buf 9159e50
Incorporating initial PR feedback
jrinehart-buf 22dc203
Missing punctuation
jrinehart-buf File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
 | ||
|
||
# Bufstream quickstart | ||
|
||
This directory contains example code for Bufstream's basic quickstart. | ||
|
||
It set up a minio for S3 storage and a postgres instance that bufstream connects to, | ||
rubensf marked this conversation as resolved.
Show resolved
Hide resolved
|
||
plus akhq for easy of exploration. | ||
|
||
Simply run: | ||
|
||
``` | ||
$ docker compose up | ||
``` | ||
|
||
And once AKHQ is ready, navigate to http://localhost:8080/ to create and explore topics. | ||
|
||
You can also access: | ||
|
||
* minio's admin interface at http://localhost:9001/ | ||
* bufstream connect endpoint at http://localhost:8089/ | ||
rubensf marked this conversation as resolved.
Show resolved
Hide resolved
|
||
* bufstream kafka endpoint at http://localhost:9092/ | ||
|
||
[docs]: https://buf.build/docs/bufstream/quickstart/ |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
auto_migrate_metadata_storage: true | ||
cluster: bufstream | ||
zone: localhost | ||
storage: | ||
provider: S3 | ||
region: us-east-1 | ||
rubensf marked this conversation as resolved.
Show resolved
Hide resolved
|
||
bucket: bufstream | ||
endpoint: http://minio:9000 | ||
access_key_id: | ||
string: admin | ||
secret_access_key: | ||
string: password | ||
postgres: | ||
dsn: | ||
string: postgres://root:nonsensepassword@postgres:5432/bufstream | ||
rubensf marked this conversation as resolved.
Show resolved
Hide resolved
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,152 @@ | ||
services: | ||
rubensf marked this conversation as resolved.
Show resolved
Hide resolved
|
||
postgres: | ||
image: postgres | ||
rubensf marked this conversation as resolved.
Show resolved
Hide resolved
|
||
container_name: postgres | ||
environment: | ||
- POSTGRES_USER=root | ||
- POSTGRES_PASSWORD=nonsensepassword | ||
- POSTGRES_DB=bufstream | ||
networks: | ||
bufstream: | ||
healthcheck: | ||
test: | ||
- CMD | ||
rubensf marked this conversation as resolved.
Show resolved
Hide resolved
|
||
- pg_isready | ||
- -d | ||
- bufstream | ||
interval: 30s | ||
rubensf marked this conversation as resolved.
Show resolved
Hide resolved
|
||
timeout: 60s | ||
retries: 5 | ||
start_period: 15s | ||
volumes: | ||
- pgData:/var/lib/postgresql/data | ||
rubensf marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
minio: | ||
image: minio/minio | ||
container_name: minio | ||
environment: | ||
- MINIO_ROOT_USER=admin | ||
- MINIO_ROOT_PASSWORD=password | ||
- MINIO_DOMAIN=minio | ||
networks: | ||
bufstream: | ||
aliases: | ||
- bufstream.minio | ||
rubensf marked this conversation as resolved.
Show resolved
Hide resolved
|
||
ports: | ||
- 9000:9000 | ||
- 9001:9001 | ||
healthcheck: | ||
rubensf marked this conversation as resolved.
Show resolved
Hide resolved
|
||
test: | ||
- CMD | ||
- curl | ||
- --silent | ||
- --fail | ||
- --output | ||
- /dev/null | ||
- http://localhost:9000/minio/health/live | ||
start_period: 15s | ||
interval: 5s | ||
timeout: 10s | ||
retries: 10 | ||
command: | ||
- server | ||
- /data | ||
- --console-address | ||
- :9001 | ||
|
||
mc: | ||
rubensf marked this conversation as resolved.
Show resolved
Hide resolved
|
||
image: minio/mc | ||
container_name: mc | ||
environment: | ||
- AWS_ACCESS_KEY_ID=admin | ||
- AWS_SECRET_ACCESS_KEY=password | ||
- AWS_REGION=us-east-1 | ||
networks: | ||
bufstream: | ||
depends_on: | ||
minio: | ||
condition: service_healthy | ||
entrypoint: > | ||
/bin/sh -c " | ||
until (/usr/bin/mc alias set minio http://minio:9000 admin password) do echo '...waiting...' && sleep 1; done; | ||
/usr/bin/mc mb minio/bufstream; | ||
/usr/bin/mc anonymous set public minio/bufstream; | ||
tail -f /dev/null | ||
" | ||
|
||
bufstream: | ||
image: bufbuild/bufstream:0.3.27 | ||
hostname: bufstream | ||
container_name: bufstream | ||
depends_on: | ||
minio: | ||
condition: service_healthy | ||
postgres: | ||
condition: service_healthy | ||
environment: | ||
- BUFSTREAM_KAFKA_HOST=bufstream | ||
- BUFSTREAM_KAFKA_PUBLIC_HOST=bufstream | ||
networks: | ||
bufstream: | ||
ports: | ||
- 9089:9089 | ||
- 9092:9092 | ||
# Edit bufstream.yaml within this repository to change configuration. | ||
volumes: | ||
- ./bufstream.yaml:/bufstream.yaml | ||
healthcheck: | ||
test: | ||
- CMD | ||
- /usr/local/bin/bufstream | ||
- admin | ||
- status | ||
- --exit-code | ||
- --url | ||
- http://127.0.0.1:9089 | ||
start_period: 15s | ||
interval: 5s | ||
timeout: 10s | ||
retries: 10 | ||
command: | ||
- serve | ||
- --config | ||
- /bufstream.yaml | ||
|
||
akhq: | ||
rubensf marked this conversation as resolved.
Show resolved
Hide resolved
|
||
image: tchiotludo/akhq:0.25.0 | ||
container_name: akhq | ||
stop_signal: SIGKILL | ||
networks: | ||
bufstream: | ||
ports: | ||
- 8080:8080 | ||
depends_on: | ||
bufstream: | ||
condition: service_healthy | ||
healthcheck: | ||
test: | ||
- CMD | ||
- curl | ||
- --silent | ||
- --fail | ||
- --output | ||
- /dev/null | ||
- http://localhost:28081/health | ||
start_period: 15s | ||
interval: 5s | ||
timeout: 10s | ||
retries: 10 | ||
environment: | ||
AKHQ_CONFIGURATION: | | ||
akhq: | ||
connections: | ||
bufstream-local: | ||
properties: | ||
bootstrap.servers: "bufstream:9092" | ||
client.id: "akhq;broker_count=1;host_override=bufstream" | ||
|
||
networks: | ||
rubensf marked this conversation as resolved.
Show resolved
Hide resolved
|
||
bufstream: | ||
|
||
volumes: | ||
pgData: |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.