forked from jstrosch/subparse
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
154 lines (145 loc) · 4.29 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
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
version: '3.7'
services:
#
# ---------------------------------------
# | Set Up For Subparse Docker Containers |
# ---------------------------------------
#
# ----------------
# | Image Versions |
# ----------------
# elasticsearch - 7.15.1
# node - lts-alpine
#
# ----------------
# | Cluster Set Up |
# ----------------
# ES01 - Main Node for the cluster
# ES02 - Sub Node for the cluter
# ES03 - Sub Node for the cluster
#
# ------------
# | Web Set Up |
# ------------
# Vue - Container set up for Vue.js instance
# NOTE: No other settings for the Vue container are specified in this file but in the Dockerfile
#
# --------------------------------------------------------------------------
# | Data Volumne(s) - all volumnes are shared with the same on disk location |
# --------------------------------------------------------------------------
# ES01 - data1
# ES02 - data2
# ES03 - data3
#
# --------------------------------------------------
# | JAVA JVM Modification(s) (For Elastic Instances) |
# --------------------------------------------------
# ES_JAVA_OPTS
# - Xms1g (Minimum Heap Size Allowed - 1 GB)
# - Xmx1g (Maximum Heap Size Allowed - 1 GB)
# !! NOTE: NO MORE THAN 50% OF YOUR TOTAL MEMORY IS TO BE USED FOR THIS SETTING
# - For example, to set the maximum heap size to 2GB, set both Xms and Xmx to 2g
# - More information can be found at: https://www.elastic.co/guide/en/elasticsearch/reference/7.16/advanced-configuration.html
#
# ------------------------
# | Docker Network |
# ------------------------
# elastic - main network for these containers to communicate on
#
# ------------------
# | Internal Network |
# ------------------
# localhost - 127.0.0.1 - local network address
# 9200 - port to connect to the elastic cluster
# 8080 - port to connect to vue container
#
es01:
image: docker.elastic.co/elasticsearch/elasticsearch:${STACK_VERSION}
container_name: elastic-01
volumes:
- esdata01:/usr/share/elasticsearch/data
ports:
- ${ES_PORT}:9200
environment:
- node.name=es01
- cluster.name=${CLUSTER_NAME}
- cluster.initial_master_nodes=es01
# - discovery.seed_hosts=es02,es03
- "ES_JAVA_OPTS=-Xms2g -Xmx2g"
- ELASTIC_PASSWORD=${ELASTIC_PASSWORD}
- bootstrap.memory_lock=true
- xpack.security.enabled=false
- xpack.monitoring.templates.enabled=false
- xpack.graph.enabled=false
- xpack.watcher.enabled=false
- xpack.license.self_generated.type=${LICENSE}
- http.host=0.0.0.0
- http.port=9200
- "http.cors.allow-origin='*'"
- "http.cors.enabled=true"
- "http.cors.allow-headers=X-Requested-With,X-Auth-Token,Content-Type,Content-Length,Authorization"
- "http.cors.allow-credentials=true"
ulimits:
memlock:
soft: -1
hard: -1
vue:
container_name: subparse-site
build:
context: .
dockerfile: Dockerfile
volumes:
- ./viewer:/app
ports:
- 8080:8080
zookeeper:
image: 'bitnami/zookeeper:latest'
container_name: zookeeper
networks:
- kafka
ports:
- 2181:2181
- 2888:2888
- 3888:3888
- 8081:8080
volumes:
- 'zookeeper_data:/bitnami'
environment:
ALLOW_ANONYMOUS_LOGIN: 'yes'
kafka:
image: 'bitnami/kafka:latest'
container_name: kafka-service-messager
networks:
- kafka
ports:
- 9092:9092
- 29092:29092
volumes:
- "kafka_data:/bitnami"
environment:
- KAFKA_CFG_ZOOKEEPER_CONNECT=zookeeper:2181
- ALLOW_PLAINTEXT_LISTENER=yes
- KAFKA_CFG_LISTENER_SECURITY_PROTOCOL_MAP=CLIENT:PLAINTEXT,EXTERNAL:PLAINTEXT
- KAFKA_CFG_LISTENERS=CLIENT://:9092,EXTERNAL://:29092
- KAFKA_CFG_ADVERTISED_LISTENERS=CLIENT://kafka:9092,EXTERNAL://localhost:29092
- KAFKA_CFG_INTER_BROKER_LISTENER_NAME=CLIENT
depends_on:
- zookeeper
volumes:
esdata01:
driver: local
esdata02:
driver: local
esdata03:
driver: local
subparse-site:
driver: local
zookeeper_data:
driver: local
kafka_data:
driver: local
networks:
elastic:
driver: bridge
kafka:
driver: bridge