diff --git a/quickstart/config.yaml b/quickstart/config.yaml index 027dfc25b..5c2844cb9 100644 --- a/quickstart/config.yaml +++ b/quickstart/config.yaml @@ -1,6 +1,6 @@ ingest: kafka: - broker: kafka:29092 + broker: kafka:9092 aggregation: clickhouse: @@ -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 diff --git a/quickstart/docker-compose.ci.yaml b/quickstart/docker-compose.ci.yaml index 084c17a8c..33c4e1497 100644 --- a/quickstart/docker-compose.ci.yaml +++ b/quickstart/docker-compose.ci.yaml @@ -1,5 +1,3 @@ -version: "3.9" - services: openmeter: image: "local" diff --git a/quickstart/docker-compose.yaml b/quickstart/docker-compose.yaml index 1d4e4c785..d365ed22f 100644 --- a/quickstart/docker-compose.yaml +++ b/quickstart/docker-compose.yaml @@ -1,5 +1,3 @@ -version: "3.9" - services: openmeter: image: ghcr.io/openmeterio/openmeter:latest @@ -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: @@ -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