-
-
Notifications
You must be signed in to change notification settings - Fork 209
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
122 lines (115 loc) · 3.03 KB
/
docker-compose.yml
File metadata and controls
122 lines (115 loc) · 3.03 KB
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
115
116
117
118
119
120
121
122
version: '3.8'
services:
postgres:
image: postgres:18
ports:
- "15432:5432"
environment:
- POSTGRES_USER=pgsync
- POSTGRES_PASSWORD=PLEASE_CHANGE_ME
- POSTGRES_DB=postgres
command: ["postgres", "-c", "wal_level=logical", "-c", "max_wal_senders=2", "-c", "max_replication_slots=2"]
redis:
image: redis
command: redis-server --requirepass PLEASE_CHANGE_ME
# Elasticsearch stack (default)
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch:7.17.13
ports:
- "9201:9200"
- "9301:9300"
environment:
- xpack.security.enabled=false
- network.host=127.0.0.1
- http.host=0.0.0.0
profiles:
- ""
kibana:
image: docker.elastic.co/kibana/kibana:7.17.13
ports:
- "5601:5601"
environment:
- ELASTICSEARCH_HOSTS=http://elasticsearch:9200
depends_on:
- elasticsearch
profiles:
- ""
# OpenSearch stack (use with --profile opensearch)
opensearch:
image: opensearchproject/opensearch:latest
profiles:
- opensearch
ports:
- "9400:9200"
- "9600:9600"
environment:
- discovery.type=single-node
- bootstrap.memory_lock=true
- "DISABLE_INSTALL_DEMO_CONFIG=true"
- "DISABLE_SECURITY_PLUGIN=true"
# PGSync with Elasticsearch (default)
pgsync-elasticsearch:
build:
context: .
dockerfile: Dockerfile
profiles:
- ""
command: ./runserver.sh
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
environment:
- PG_USER=pgsync
- PG_HOST=postgres
- PG_PORT=5432
- PG_PASSWORD=PLEASE_CHANGE_ME
- LOG_LEVEL=INFO
- ELASTICSEARCH_PORT=9200
- ELASTICSEARCH_SCHEME=http
- ELASTICSEARCH_HOST=elasticsearch
- REDIS_HOST=redis
- REDIS_PORT=6379
- REDIS_AUTH=PLEASE_CHANGE_ME
- ELASTICSEARCH=true
# PGSync with OpenSearch
pgsync-opensearch:
profiles:
- opensearch
build:
context: .
dockerfile: Dockerfile
command: ./runserver.sh
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 OpenSearch sync"
com.label-schema.service-type: "daemon"
depends_on:
- postgres
- redis
- opensearch
environment:
- PG_USER=pgsync
- PG_HOST=postgres
- PG_PORT=5432
- PG_PASSWORD=PLEASE_CHANGE_ME
- LOG_LEVEL=INFO
- ELASTICSEARCH_PORT=9200
- ELASTICSEARCH_SCHEME=http
- ELASTICSEARCH_HOST=opensearch
- REDIS_HOST=redis
- REDIS_PORT=6379
- REDIS_AUTH=PLEASE_CHANGE_ME
- OPENSEARCH=true