Skip to content

Commit 4977dd6

Browse files
committed
Init commit
0 parents  commit 4977dd6

24 files changed

+26144
-0
lines changed

.gitignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
*.iml
2+
*.log
3+
*.iws
4+
*.ipr
5+
6+
.DS_Store
7+
.idea

.pre-commit-config.yaml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
---
2+
exclude: .key$
3+
repos:
4+
- repo: https://github.com/pre-commit/pre-commit-hooks
5+
rev: v4.5.0
6+
hooks:
7+
- id: trailing-whitespace
8+
- id: end-of-file-fixer
9+
- id: fix-byte-order-marker
10+
- id: mixed-line-ending
11+
- id: check-merge-conflict
12+
- id: check-case-conflict
13+
14+
- repo: https://github.com/Lucas-C/pre-commit-hooks
15+
rev: v1.5.4
16+
hooks:
17+
- id: remove-crlf
18+
- id: remove-tabs

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2024 Romanov Alexey
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Docker Compose examples
2+
3+
* [Kafka](kafka/README.md)
4+
* [Monitoring](monitoring/README.md)
5+
* [Postgres](postgres/README.md)
6+
* [Logging](logging/README.md)
7+
* [ElasticSearch](elastic/README.md)

elastic/README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# ElasticSearch
2+
3+
* [Single Node](docker-compose.single-node.yml)
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
version: "3.9"
2+
services:
3+
elastic:
4+
image: elasticsearch:8.12.2
5+
container_name: elastic
6+
environment:
7+
discovery.type: single-node
8+
node.name: elastics
9+
bootstrap.memory_lock: true
10+
cluster.routing.allocation.disk.threshold_enabled: false
11+
xpack.security.enabled: false
12+
ES_JAVA_OPTS: "-Xms1024m -Xmx1024m"
13+
healthcheck:
14+
test: [ "CMD-SHELL", "curl -f http://localhost:9200/_cat/health | grep -q green" ]
15+
interval: 20s
16+
timeout: 20s
17+
retries: 10
18+
ports:
19+
- "9200:9200"
20+
- "9300:9300"
21+
volumes:
22+
- elastic:/usr/share/elasticsearch/data
23+
24+
kibana:
25+
image: kibana:8.12.2
26+
container_name: kibana
27+
environment:
28+
ELASTICSEARCH_HOSTS: http://elastic:9200
29+
healthcheck:
30+
test: [ "CMD-SHELL", "curl --silent --fail localhost:5601/api/status || exit 1" ]
31+
interval: 20s
32+
timeout: 10s
33+
retries: 10
34+
ports:
35+
- "5601:5601"
36+
volumes:
37+
- kibana:/usr/share/kibana/data
38+
depends_on:
39+
elastic:
40+
condition: service_healthy
41+
42+
volumes:
43+
elastic:
44+
kibana:

kafka/README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Kafka and Zookeeper
2+
3+
* [Single Node](docker-compose.standalone.yml)

kafka/docker-compose.single-node.yml

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
version: "3.9"
2+
services:
3+
zookeeper:
4+
image: confluentinc/cp-zookeeper:7.7.1
5+
container_name: zookeeper
6+
environment:
7+
ZOOKEEPER_CLIENT_PORT: 2181
8+
ZOOKEEPER_TICK_TIME: 2000
9+
healthcheck:
10+
test: [ "CMD-SHELL", "nc -z localhost 2181 || exit -1" ]
11+
interval: 10s
12+
timeout: 5s
13+
retries: 10
14+
ports:
15+
- "2181:2181"
16+
17+
kafka:
18+
image: confluentinc/cp-kafka:7.7.1
19+
container_name: kafka
20+
ports:
21+
- "9092:9092"
22+
environment:
23+
KAFKA_BROKER_ID: 1
24+
KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181
25+
KAFKA_ADVERTISED_LISTENERS: INTERNAL://kafka:29092,EXTERNAL://localhost:9092
26+
KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: INTERNAL:PLAINTEXT,EXTERNAL:PLAINTEXT
27+
KAFKA_INTER_BROKER_LISTENER_NAME: INTERNAL
28+
KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1
29+
KAFKA_TRANSACTION_STATE_LOG_MIN_ISR: 1
30+
KAFKA_TRANSACTION_STATE_LOG_REPLICATION_FACTOR: 1
31+
healthcheck:
32+
test: [ "CMD-SHELL", "kafka-topics --bootstrap-server localhost:9092 --list" ]
33+
interval: 10s
34+
timeout: 5s
35+
retries: 10
36+
depends_on:
37+
zookeeper:
38+
condition: service_healthy
39+
40+
console:
41+
image: docker.redpanda.com/redpandadata/console:latest
42+
container_name: console
43+
environment:
44+
KAFKA_BROKERS: kafka:29092
45+
ports:
46+
- "8081:8080"
47+
healthcheck:
48+
test: [ "CMD-SHELL", "curl --fail http://localhost:8080 || exit 1" ]
49+
interval: 5s
50+
timeout: 5s
51+
retries: 5
52+
depends_on:
53+
kafka:
54+
condition: service_healthy

logging/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# Fluent Bit

logging/docker-compose.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
version: "3.9"
2+
services:
3+
fluent-bit:
4+
image: fluent/fluent-bit:3.1.7-debug
5+
container_name: fluent-bit
6+
ports:
7+
- "5170:5170"
8+
healthcheck:
9+
test: [ "CMD-SHELL", "curl --silent --fail http://localhost:2020/api/v1/health" ]
10+
interval: 5s
11+
timeout: 2s
12+
retries: 5
13+
volumes:
14+
- ./fluent-bit/fluent-bit.conf:/fluent-bit/etc/fluent-bit.conf

0 commit comments

Comments
 (0)