forked from repco-org/repco
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
109 lines (102 loc) · 2.82 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
version: '3.1'
services:
db:
image: postgres
# 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}
labels:
co.elastic.logs/module: elasticsearch
volumes:
- ./data/elastic/es01:/usr/share/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}
mem_limit: ${ELASTIC_MEM_LIMIT}
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: redis
command: [ "redis-server", "--requirepass", "${REDIS_PASSWORD}" ]
volumes:
- ./data/redis:/data
ports:
- '6379:6379'
pgsync:
build:
context: ./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=${ELASTIC_PORT}
- 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