-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose-elasticsearch-pgsync.yml
68 lines (63 loc) · 1.52 KB
/
docker-compose-elasticsearch-pgsync.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
version: '3'
services:
postgraphile:
image: graphile/postgraphile:v4.12.3
env_file:
- .env
depends_on:
- postgres
links:
- postgres
ports:
- 5000:5000
command:
[
"--connection",
"postgres://postgres:postgres@postgres:5432/postgres",
"--port",
"5000",
"--schema",
"public",
"--watch"
]
redis:
image: redis:6-alpine
command: redis-server --appendonly yes
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch:7.14.1
ports:
- "9200:9200"
ulimits:
memlock:
soft: -1
hard: -1
environment:
- xpack.security.enabled=false
- http.host=0.0.0.0
- discovery.type=single-node
- bootstrap.memory_lock=true
- "ES_JAVA_OPTS=-Xms512m -Xmx512m"
pgsync:
image: govpf/pgsync:2.1.0
volumes:
- ./pgsync/schema:/schema
command: >
sh -c "bootstrap --config /schema/salp.json &&
pgsync --config /schema/salp.json --daemon"
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:
- postgres
- redis
- elasticsearch
env_file:
- .env
environment:
- ELASTICSEARCH_HOST=elasticsearch
- REDIS_HOST=redis