Skip to content

Commit

Permalink
chore: update Qucikstart
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisgacsal committed Oct 4, 2024
1 parent c7a31b5 commit 7c811fb
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 52 deletions.
11 changes: 9 additions & 2 deletions quickstart/config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
ingest:
kafka:
broker: kafka:29092
broker: kafka:9092

aggregation:
clickhouse:
Expand All @@ -10,8 +10,15 @@ sink:
minCommitCount: 1
namespaceRefetch: 1s
kafka:
brokers: kafka:29092
brokers: kafka:9092
brokerAddressFamily: v4
dedupe:
enabled: true
driver: redis
config:
address: redis:6379
database: 0
expiration: 768h # 32d

postgres:
url: postgres://postgres:postgres@postgres:5432/postgres?sslmode=disable
Expand Down
2 changes: 0 additions & 2 deletions quickstart/docker-compose.ci.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
version: "3.9"

services:
openmeter:
image: "local"
Expand Down
69 changes: 21 additions & 48 deletions quickstart/docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
version: "3.9"

services:
openmeter:
image: ghcr.io/openmeterio/openmeter:latest
Expand All @@ -14,7 +12,7 @@ services:
postgres:
condition: service_healthy
ports:
- 127.0.0.1:8888:8888
- "127.0.0.1:8888:8888"
volumes:
- ./config.yaml:/etc/openmeter/config.yaml
healthcheck:
Expand All @@ -35,70 +33,45 @@ services:
condition: service_healthy
openmeter:
condition: service_healthy
redis:
condition: service_healthy
ports:
- 127.0.0.1:10000:10000
- "127.0.0.1:10000:10000"
volumes:
- ./config.yaml:/etc/openmeter/config.yaml

zookeeper:
kafka:
extends:
file: ../docker-compose.yaml
service: zookeeper

# Duplicating kafka here due to https://github.com/docker/compose/issues/11544
kafka:
image: confluentinc/cp-kafka:7.4.0
depends_on:
- zookeeper
ports:
- 127.0.0.1:29092:29092
environment:
KAFKA_BROKER_ID: 1
KAFKA_ZOOKEEPER_CONNECT: "zookeeper:2181"
KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: PLAINTEXT:PLAINTEXT,PLAINTEXT_HOST:PLAINTEXT
# KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://kafka:9092,PLAINTEXT_HOST://localhost:29092
KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1
KAFKA_GROUP_INITIAL_REBALANCE_DELAY_MS: 0
KAFKA_TRANSACTION_STATE_LOG_MIN_ISR: 1
KAFKA_TRANSACTION_STATE_LOG_REPLICATION_FACTOR: 1
KAFKA_AUTO_CREATE_TOPICS_ENABLE: "false"
KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://kafka:9092,PLAINTEXT_HOST://kafka:29092
healthcheck:
test: kafka-topics --bootstrap-server kafka:9092 --list
interval: 5s
timeout: 3s
retries: 100
service: kafka

clickhouse:
extends:
file: ../docker-compose.yaml
service: clickhouse

redis:
image: redis:7.0-alpine
ports:
- "127.0.0.1:6379:6379"
command: ["redis-server", "--maxmemory", "50mb", "--maxmemory-policy", "noeviction", "--maxmemory-samples", "10"]
healthcheck:
test: wget --no-verbose --tries=1 --spider http://clickhouse:8123/ping || exit 1
test: ["CMD-SHELL", "redis-cli ping | grep PONG"]
interval: 5s
timeout: 3s
retries: 100

# Profile: dedupe-redis
redis:
extends:
file: ../docker-compose.yaml
service: redis
retries: 30

postgres:
image: postgres:14.9
image: postgres:14.9-alpine
ports:
- "5432:5432"
- "127.0.0.1:5432:5432"
environment:
- POSTGRES_USER=postgres
- POSTGRES_DB=postgres
- POSTGRES_PASSWORD=postgres
command:
- "postgres"
- "-c"
- "wal_level=logical"
command: ["postgres", "-c", "wal_level=logical"]
healthcheck:
test: ["CMD-SHELL", "pg_isready", "-d", "db_prod"]
interval: 5s
timeout: 60s
retries: 5
test: ["CMD-SHELL", "pg_isready", "-d", "$${POSTGRES_DB}", "-U", "$${POSTGRES_USER}"]
interval: 10s
timeout: 5s
retries: 30

0 comments on commit 7c811fb

Please sign in to comment.