|
| 1 | +services: |
| 2 | + # Bufstream uses PostgreSQL 14+ (https://www.postgresql.org/) for storing cluster metadata. |
| 3 | + postgres: |
| 4 | + image: postgres:14 |
| 5 | + environment: ["POSTGRES_USER=root", "POSTGRES_PASSWORD=password", "POSTGRES_DB=bufstream"] |
| 6 | + network_mode: host |
| 7 | + volumes: ["./postgres:/var/lib/postgresql/data"] |
| 8 | + healthcheck: |
| 9 | + test: ["CMD", "pg_isready", "-d", "bufstream"] |
| 10 | + interval: 2s |
| 11 | + retries: 30 |
| 12 | + |
| 13 | + # MinIO provides local S3-compatible object storage. |
| 14 | + minio: |
| 15 | + image: minio/minio:RELEASE.2025-05-24T17-08-30Z |
| 16 | + network_mode: host |
| 17 | + volumes: ["./minio:/data"] |
| 18 | + healthcheck: |
| 19 | + test: ["CMD", "curl", "--silent", "--fail", "--output", "/dev/null", "http://localhost:9000/minio/health/live"] |
| 20 | + interval: 2s |
| 21 | + retries: 30 |
| 22 | + command: ["server", "/data", "--console-address", ":9001"] |
| 23 | + |
| 24 | + # Minio Client (https://min.io/docs/minio/linux/reference/minio-mc.html) bootstraps a MinIO bucket. |
| 25 | + mc: |
| 26 | + image: minio/mc:RELEASE.2025-05-21T01-59-54Z |
| 27 | + depends_on: |
| 28 | + minio: { "condition": "service_healthy" } |
| 29 | + network_mode: host |
| 30 | + entrypoint: > |
| 31 | + /bin/sh -c " |
| 32 | + until (/usr/bin/mc alias set minio http://localhost:9000 minioadmin minioadmin) do echo '...waiting...' && sleep 1; done; |
| 33 | + /usr/bin/mc mb minio/bufstream; /usr/bin/mc anonymous set public minio/bufstream; |
| 34 | + " |
| 35 | +
|
| 36 | + # The Bufstream broker, available at localhost:9092. |
| 37 | + bufstream: |
| 38 | + image: bufbuild/bufstream:0.3.29 |
| 39 | + depends_on: |
| 40 | + postgres: { "condition": "service_healthy" } |
| 41 | + mc: { "condition": "service_completed_successfully" } |
| 42 | + network_mode: host |
| 43 | + hostname: bufstream |
| 44 | + volumes: ["./bufstream.yaml:/bufstream.yaml"] |
| 45 | + healthcheck: |
| 46 | + test: ["CMD", "/usr/local/bin/bufstream", "admin", "status", "--exit-code", "--url", "http://127.0.0.1:9089"] |
| 47 | + command: ["serve", "--config", "/bufstream.yaml"] |
0 commit comments