-
Notifications
You must be signed in to change notification settings - Fork 4
/
docker-compose.yml
114 lines (109 loc) · 2.99 KB
/
docker-compose.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
version: '3.1'
services:
db:
image: postgres
container_name: repco-db
# restart: always
volumes:
- './data/postgres:/var/lib/postgresql/data'
ports:
- 5432:5432
command:
['postgres', '-c', 'wal_level=logical', '-c', 'max_replication_slots=4']
environment:
POSTGRES_PASSWORD: repco
POSTGRES_USER: repco
POSTGRES_DB: repco
meilisearch:
image: getmeili/meilisearch:v1.0
ports:
- 7700:7700
environment:
- MEILI_MASTER_KEY=${MEILISEARCH_API_KEY}
volumes:
- ./data/meilisearch:/meili_data
es01:
image: docker.elastic.co/elasticsearch/elasticsearch:${ELASTIC_VERSION}
container_name: repco-es
labels:
co.elastic.logs/module: elasticsearch
volumes:
- ./data/elastic/es01:/var/lib/elasticsearch/data
ports:
- ${ELASTIC_PORT}:9200
environment:
- node.name=es01
- cluster.name=${ELASTIC_CLUSTER_NAME}
- discovery.type=single-node
- ELASTIC_PASSWORD=${ELASTIC_PASSWORD}
- bootstrap.memory_lock=true
- xpack.security.enabled=false
- xpack.license.self_generated.type=${ELASTIC_LICENSE}
- ES_JAVA_OPTS=-Xms750m -Xmx750m
- http.host=0.0.0.0
- transport.host=127.0.0.1
#mem_limit: 1073741824
ulimits:
memlock:
soft: -1
hard: -1
healthcheck:
test:
[
'CMD-SHELL',
"curl -s --user elastic:${ELASTIC_PASSWORD} -X GET http://localhost:9200/_cluster/health?pretty | grep status | grep -q '\\(green\\|yellow\\)'",
]
interval: 10s
timeout: 10s
retries: 120
redis:
image: 'redis:alpine'
container_name: repco-redis
command: ['redis-server', '--requirepass', '${REDIS_PASSWORD}']
volumes:
- ./data/redis:/data
ports:
- '6379:6379'
pgsync:
build:
context: ./pgsync
container_name: repco-pgsync
volumes:
- ./data/pgsync:/data
sysctls:
- net.ipv4.tcp_keepalive_time=200
- net.ipv4.tcp_keepalive_intvl=200
- net.ipv4.tcp_keepalive_probes=5
labels:
org.label-schema.name: 'pgsync'
org.label-schema.description: 'Postgres to Elasticsearch sync'
com.label-schema.service-type: 'daemon'
depends_on:
- db
- es01
- redis
environment:
- PG_USER=repco
- PG_HOST=db
- PG_PORT=5432
- PG_PASSWORD=repco
- PG_DATABASE=repco
- LOG_LEVEL=DEBUG
- ELASTICSEARCH_PORT=9200
- ELASTICSEARCH_SCHEME=http
- ELASTICSEARCH_HOST=es01
- ELASTICSEARCH_CHUNK_SIZE=100
- ELASTICSEARCH_MAX_CHUNK_BYTES=3242880
- ELASTICSEARCH_MAX_RETRIES=14
- ELASTICSEARCH_QUEUE_SIZE=1
- ELASTICSEARCH_STREAMING_BULK=True
- ELASTICSEARCH_THREAD_COUNT=1
- ELASTICSEARCH_TIMEOUT=320
- REDIS_HOST=redis
- REDIS_PORT=6379
- REDIS_AUTH=${REDIS_PASSWORD}
- REDIS_READ_CHUNK_SIZE=100
- ELASTICSEARCH=true
- OPENSEARCH=false
- SCHEMA=/data
- CHECKPOINT_PATH=/data