Skip to content

Commit 00690c2

Browse files
committed
Move Patroni, Mongo, Redis and Elastic cluster from databases repository
1 parent 644fdcb commit 00690c2

25 files changed

+689
-15
lines changed

.pre-commit-config.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,10 @@ repos:
1616
hooks:
1717
- id: remove-crlf
1818
- id: remove-tabs
19+
20+
- repo: https://github.com/igorshubovych/markdownlint-cli
21+
rev: v0.41.0
22+
hooks:
23+
- id: markdownlint
24+
name: Markdown Lint
25+
args: [ --disable=MD007,--disable=MD013,--disable=MD014,--disable=MD024,--disable=MD031 ]

README.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
[![Build](https://github.com/Romanow/docker-compose-examples/actions/workflows/build.yaml/badge.svg?branch=master)](https://github.com/Romanow/docker-compose-examples/actions/workflows/build.yaml)
1+
[![CI](https://github.com/Romanow/docker-compose-examples/actions/workflows/build.yaml/badge.svg?branch=master)](https://github.com/Romanow/docker-compose-examples/actions/workflows/build.yaml)
22
[![pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit)](https://github.com/pre-commit/pre-commit)
3-
[![License](https://img.shields.io/github/license/Romanow/docker-compose-examples)](https://github.com/Romanow/docker-compose-exampleslist/blob/main/LICENSE)
3+
[![License](https://img.shields.io/github/license/Romanow/docker-compose-examples)](https://github.com/Romanow/docker-compose-examples/blob/master/LICENSE)
44

55
# Docker Compose examples
66

@@ -13,7 +13,10 @@
1313
## Storages
1414

1515
* [Postgres](postgres/README.md)
16+
* [Patroni](mysql/README.md)
17+
* [Mongo](mysql/README.md)
1618
* [MySQL](mysql/README.md)
19+
* [Redis](mysql/README.md)
1720
* [Elastic](elastic/README.md)
1821
* [Minio](minio/README.md)
1922

artemis/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
11
# ArtemisMQ
2+
3+
* [Simple](docker-compose.yml)

artemis/docker-compose.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ services:
1313
timeout: 10s
1414
retries: 5
1515
volumes:
16-
- artemis-data:/var/lib/artemis-instance
16+
- artemis:/var/lib/artemis-instance
1717

1818
volumes:
19-
artemis-data:
19+
artemis:

elastic/README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
11
# ElasticSearch
22

33
* [Single Node](docker-compose.yml)
4+
* [Cluster](docker-compose.cluster.yml)
5+
6+
```shell
7+
$ docker-compose up -d --wait
8+
$ curl 'http://localhost:9200/_cluster/health?pretty' --user elastic:qwerty
9+
```

elastic/certs/ca-elastic.p12

2.61 KB
Binary file not shown.

elastic/docker-compose.cluster.yml

Lines changed: 110 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,110 @@
1+
services:
2+
elastic-1:
3+
image: "bitnami/elasticsearch:8.17.1"
4+
container_name: elastic-1
5+
environment:
6+
BITNAMI_DEBUG: true
7+
ELASTICSEARCH_NODE_NAME: elastic-1
8+
ELASTICSEARCH_CLUSTER_NAME: elastic
9+
ELASTICSEARCH_PASSWORD: qwerty
10+
ELASTICSEARCH_ENABLE_SECURITY: true
11+
ELASTICSEARCH_ENABLE_REST_TLS: false
12+
ELASTICSEARCH_TLS_VERIFICATION_MODE: none
13+
ELASTICSEARCH_TRANSPORT_TLS_KEYSTORE_LOCATION: /opt/bitnami/elasticsearch/config/certs/ca-elastic.p12
14+
ELASTICSEARCH_TRANSPORT_TLS_TRUSTSTORE_LOCATION: /opt/bitnami/elasticsearch/config/certs/ca-elastic.p12
15+
ELASTICSEARCH_CLUSTER_HOSTS: elastic-1,elastic-2,elastic-3
16+
ELASTICSEARCH_HEAP_SIZE: 1g
17+
ports:
18+
- "9200:9200"
19+
- "9300:9300"
20+
healthcheck:
21+
test: [ "CMD-SHELL", "curl --silent --fail --user elastic:qwerty localhost:9200/_cluster/health?local=true || exit 1" ]
22+
interval: 20s
23+
timeout: 20s
24+
retries: 10
25+
volumes:
26+
- elastic-1:/bitnami
27+
- ./certs/:/opt/bitnami/elasticsearch/config/certs/
28+
29+
elastic-2:
30+
image: "bitnami/elasticsearch:8.17.1"
31+
container_name: elastic-2
32+
environment:
33+
ELASTICSEARCH_NODE_NAME: elastic-2
34+
ELASTICSEARCH_CLUSTER_NAME: elastic
35+
ELASTICSEARCH_PASSWORD: qwerty
36+
ELASTICSEARCH_ENABLE_SECURITY: true
37+
ELASTICSEARCH_ENABLE_REST_TLS: false
38+
ELASTICSEARCH_TLS_VERIFICATION_MODE: none
39+
ELASTICSEARCH_TRANSPORT_TLS_KEYSTORE_LOCATION: /opt/bitnami/elasticsearch/config/certs/ca-elastic.p12
40+
ELASTICSEARCH_TRANSPORT_TLS_TRUSTSTORE_LOCATION: /opt/bitnami/elasticsearch/config/certs/ca-elastic.p12
41+
ELASTICSEARCH_CLUSTER_HOSTS: elastic-1,elastic-2,elastic-3
42+
ELASTICSEARCH_HEAP_SIZE: 1g
43+
ports:
44+
- "9201:9200"
45+
- "9301:9300"
46+
healthcheck:
47+
test: [ "CMD-SHELL", "curl --silent --fail --user elastic:qwerty localhost:9200/_cluster/health?local=true || exit 1" ]
48+
interval: 20s
49+
timeout: 20s
50+
retries: 10
51+
volumes:
52+
- elastic-2:/bitnami
53+
- ./certs/:/opt/bitnami/elasticsearch/config/certs/
54+
55+
elastic-3:
56+
image: "bitnami/elasticsearch:8.17.1"
57+
container_name: elastic-3
58+
environment:
59+
ELASTICSEARCH_NODE_NAME: elastic-3
60+
ELASTICSEARCH_CLUSTER_NAME: elastic
61+
ELASTICSEARCH_PASSWORD: qwerty
62+
ELASTICSEARCH_ENABLE_SECURITY: true
63+
ELASTICSEARCH_ENABLE_REST_TLS: false
64+
ELASTICSEARCH_TLS_VERIFICATION_MODE: none
65+
ELASTICSEARCH_TRANSPORT_TLS_KEYSTORE_LOCATION: /opt/bitnami/elasticsearch/config/certs/ca-elastic.p12
66+
ELASTICSEARCH_TRANSPORT_TLS_TRUSTSTORE_LOCATION: /opt/bitnami/elasticsearch/config/certs/ca-elastic.p12
67+
ELASTICSEARCH_CLUSTER_HOSTS: elastic-1,elastic-2,elastic-3
68+
ELASTICSEARCH_HEAP_SIZE: 1g
69+
ports:
70+
- "9202:9200"
71+
- "9302:9300"
72+
healthcheck:
73+
test: [ "CMD-SHELL", "curl --silent --fail --user elastic:qwerty localhost:9200/_cluster/health?local=true || exit 1" ]
74+
interval: 20s
75+
timeout: 20s
76+
retries: 10
77+
volumes:
78+
- elastic-3:/bitnami
79+
- ./certs/:/opt/bitnami/elasticsearch/config/certs/
80+
81+
kibana:
82+
image: "bitnami/kibana:8.17.1"
83+
container_name: kibana
84+
environment:
85+
KIBANA_CREATE_USER: yes
86+
KIBANA_PASSWORD: qwerty
87+
KIBANA_ELASTICSEARCH_PASSWORD: qwerty
88+
KIBANA_ELASTICSEARCH_URL: elastic-1
89+
ports:
90+
- "5601:5601"
91+
healthcheck:
92+
test: [ "CMD-SHELL", "curl --silent --fail localhost:5601/api/status || exit 1" ]
93+
interval: 15s
94+
timeout: 15s
95+
retries: 5
96+
volumes:
97+
- kibana:/bitnami/kibana
98+
depends_on:
99+
elastic-1:
100+
condition: service_healthy
101+
elastic-2:
102+
condition: service_healthy
103+
elastic-3:
104+
condition: service_healthy
105+
106+
volumes:
107+
elastic-1:
108+
elastic-2:
109+
elastic-3:
110+
kibana:

elastic/docker-compose.yml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
services:
22
elastic:
3-
image: elasticsearch:8.12.2
3+
image: "bitnami/elasticsearch:8.17.1"
44
container_name: elastic
55
environment:
6-
discovery.type: single-node
7-
node.name: elastics
8-
bootstrap.memory_lock: true
9-
cluster.routing.allocation.disk.threshold_enabled: false
10-
xpack.security.enabled: false
11-
ES_JAVA_OPTS: "-Xms1024m -Xmx1024m"
6+
ELASTICSEARCH_NODE_NAME: elastic
7+
ELASTICSEARCH_CLUSTER_NAME: elastic
8+
ELASTICSEARCH_ENABLE_SECURITY: false
9+
ELASTICSEARCH_ENABLE_REST_TLS: false
10+
ELASTICSEARCH_LOCK_ALL_MEMORY: true
11+
ELASTICSEARCH_HEAP_SIZE: 1g
1212
healthcheck:
13-
test: [ "CMD-SHELL", "curl -f http://localhost:9200/_cat/health | grep -q green" ]
13+
test: [ "CMD-SHELL", "curl --silent --fail --user elastic:qwerty localhost:9200/_cluster/health?local=true || exit 1" ]
1414
interval: 20s
1515
timeout: 20s
1616
retries: 10
@@ -21,10 +21,10 @@ services:
2121
- elastic:/usr/share/elasticsearch/data
2222

2323
kibana:
24-
image: kibana:8.12.2
24+
image: "bitnami/kibana:8.17.1"
2525
container_name: kibana
2626
environment:
27-
ELASTICSEARCH_HOSTS: http://elastic:9200
27+
KIBANA_ELASTICSEARCH_URL: elastic
2828
healthcheck:
2929
test: [ "CMD-SHELL", "curl --silent --fail localhost:5601/api/status || exit 1" ]
3030
interval: 20s

frontend/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
11
# Frontend
2+
3+
* [Simple](docker-compose.yml)

java/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
11
# Java
2+
3+
* [Simple](docker-compose.yml)

0 commit comments

Comments
 (0)