diff --git a/elastic/docker-compose.yml b/elastic/docker-compose.yml index 4584394..6834471 100644 --- a/elastic/docker-compose.yml +++ b/elastic/docker-compose.yml @@ -1,4 +1,3 @@ -version: "3.9" services: elastic: image: elasticsearch:8.12.2 diff --git a/java/docker-compose.yml b/java/docker-compose.yml index d4c6260..06cca5d 100644 --- a/java/docker-compose.yml +++ b/java/docker-compose.yml @@ -1,4 +1,3 @@ -version: "3.9" services: echo-server: image: romanowalex/echo-server:v2.0 diff --git a/kafka/README.md b/kafka/README.md index 8aba0b8..120f672 100644 --- a/kafka/README.md +++ b/kafka/README.md @@ -1,3 +1,4 @@ # Kafka and Zookeeper * [Single Node](docker-compose.yml) +* [Cluster](docker-compose.cluster.yml) diff --git a/kafka/docker-compose.cluster.yml b/kafka/docker-compose.cluster.yml new file mode 100644 index 0000000..337df01 --- /dev/null +++ b/kafka/docker-compose.cluster.yml @@ -0,0 +1,78 @@ +services: + zookeeper: + image: confluentinc/cp-zookeeper:7.7.1 + container_name: zookeeper + environment: + ZOOKEEPER_CLIENT_PORT: 2181 + ZOOKEEPER_TICK_TIME: 2000 + healthcheck: + test: [ "CMD-SHELL", "nc -z localhost 2181 || exit -1" ] + interval: 10s + timeout: 5s + retries: 10 + ports: + - "2181:2181" + + kafka-1: + image: confluentinc/cp-kafka:7.7.1 + container_name: kafka-1 + ports: + - "9092:9092" + environment: + KAFKA_BROKER_ID: 1 + KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181 + KAFKA_ADVERTISED_LISTENERS: INTERNAL://kafka-1:29092,EXTERNAL://localhost:9092 + KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: INTERNAL:PLAINTEXT,EXTERNAL:PLAINTEXT + KAFKA_INTER_BROKER_LISTENER_NAME: INTERNAL + KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1 + KAFKA_TRANSACTION_STATE_LOG_MIN_ISR: 1 + KAFKA_TRANSACTION_STATE_LOG_REPLICATION_FACTOR: 1 + healthcheck: + test: [ "CMD-SHELL", "kafka-topics --bootstrap-server localhost:9092 --list" ] + interval: 10s + timeout: 5s + retries: 10 + depends_on: + zookeeper: + condition: service_healthy + + kafka-2: + image: confluentinc/cp-kafka:7.7.1 + container_name: kafka-2 + ports: + - "9093:9093" + environment: + KAFKA_BROKER_ID: 2 + KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181 + KAFKA_ADVERTISED_LISTENERS: INTERNAL://kafka-2:29093,EXTERNAL://localhost:9093 + KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: INTERNAL:PLAINTEXT,EXTERNAL:PLAINTEXT + KAFKA_INTER_BROKER_LISTENER_NAME: INTERNAL + KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1 + KAFKA_TRANSACTION_STATE_LOG_MIN_ISR: 1 + KAFKA_TRANSACTION_STATE_LOG_REPLICATION_FACTOR: 1 + healthcheck: + test: [ "CMD-SHELL", "kafka-topics --bootstrap-server localhost:9093 --list" ] + interval: 10s + timeout: 5s + retries: 10 + depends_on: + zookeeper: + condition: service_healthy + + console: + image: docker.redpanda.com/redpandadata/console:latest + container_name: console + environment: + KAFKA_BROKERS: "kafka-1:29092,kafka-2:29093" + ports: + - "8081:8080" + healthcheck: + test: [ "CMD-SHELL", "curl --fail http://localhost:8080 || exit 1" ] + interval: 5s + timeout: 5s + retries: 5 + depends_on: + kafka-1: + condition: service_healthy + kafka-2: + condition: service_healthy diff --git a/kafka/docker-compose.yml b/kafka/docker-compose.yml index 5233ec1..1d32185 100644 --- a/kafka/docker-compose.yml +++ b/kafka/docker-compose.yml @@ -1,4 +1,3 @@ -version: "3.9" services: zookeeper: image: confluentinc/cp-zookeeper:7.7.1 diff --git a/logging/docker-compose.yml b/logging/docker-compose.yml index 9e2b738..f91cf9e 100644 --- a/logging/docker-compose.yml +++ b/logging/docker-compose.yml @@ -1,4 +1,3 @@ -version: "3.9" services: fluent-bit: image: fluent/fluent-bit:3.1.7-debug diff --git a/minio/README.md b/minio/README.md index a7840ff..69a16a2 100644 --- a/minio/README.md +++ b/minio/README.md @@ -5,4 +5,4 @@ $ mc alias set local http://localhost:9000 program qwerty123 $ mc mb local/my-bucket $ mc mv data.txt local/my-bucket/ -``` \ No newline at end of file +``` diff --git a/minio/docker-compose.yml b/minio/docker-compose.yml index 6be0986..2b1357f 100644 --- a/minio/docker-compose.yml +++ b/minio/docker-compose.yml @@ -1,5 +1,3 @@ -version: "3.9" - x-minio-common: &minio-common image: minio/minio:latest @@ -50,4 +48,4 @@ services: volumes: data1: - data2: \ No newline at end of file + data2: diff --git a/minio/nginx.conf b/minio/nginx.conf index 7b407d7..df027d1 100644 --- a/minio/nginx.conf +++ b/minio/nginx.conf @@ -84,4 +84,4 @@ http { proxy_pass http://console; } } -} \ No newline at end of file +} diff --git a/postgres/docker-compose.yml b/postgres/docker-compose.yml index eb19a12..08cea1e 100644 --- a/postgres/docker-compose.yml +++ b/postgres/docker-compose.yml @@ -1,4 +1,3 @@ -version: "3.9" services: postgres: build: .