forked from ProjectLogscope/logscope
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcompose.yaml
More file actions
215 lines (208 loc) · 4.8 KB
/
Copy pathcompose.yaml
File metadata and controls
215 lines (208 loc) · 4.8 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
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
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
version: '3.9'
networks:
default:
name: ingestor
driver: bridge
# external: true
volumes:
datastore-elasticsearch:
name: datastore-elasticsearch
driver: local
shared-logs:
name: shared-logs
driver: local
services:
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch:8.11.1
container_name: elasticsearch
networks:
- default
hostname: elasticsearch
ports:
- 9200:9200
deploy:
resources:
limits:
cpus: '1.0'
memory: 1G
restart_policy:
condition: on-failure
delay: 3s
max_attempts: 10
window: 60s
environment:
- node.name=es-node
- cluster.name=es-cluster
- discovery.type=single-node
- xpack.security.enabled=false
volumes:
- type: volume
source: datastore-elasticsearch
target: /usr/share/elasticsearch/data
read_only: false
volume:
nocopy: false
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:9200"]
interval: 5s
timeout: 5s
retries: 10
nats:
image: nats:2.10.5-alpine3.18
container_name: nats
tty: true
networks:
- default
hostname: nats
ports:
- 8222:8222
deploy:
resources:
limits:
cpus: '0.25'
memory: 500M
restart_policy:
condition: on-failure
delay: 3s
max_attempts: 10
window: 60s
healthcheck:
test: ["CMD", "wget", "--quiet", "--tries=1", "--spider", "http://localhost:8222/healthz"]
interval: 5s
timeout: 5s
retries: 5
collector:
build:
context: ./collector
dockerfile: build/api/Dockerfile
args:
GO_VERSION: 1.21
ALPINE_VERSION: 3.18
target: final
container_name: collector
depends_on:
nats:
condition: service_healthy
networks:
- default
hostname: collector
ports:
- 3000:3000
deploy:
resources:
limits:
cpus: '0.1'
memory: 100M
restart_policy:
condition: on-failure
delay: 3s
max_attempts: 10
window: 60s
env_file:
- ./environment/collector/nats.env
- ./environment/collector/server.env
- ./environment/collector/service.env
volumes:
# - type: volume
# source: shared-logs
# target: /service/log
# read_only: false
# volume:
# nocopy: false
- type: bind
source: ./logs
target: /service/log
healthcheck:
test: ["CMD", "wget", "--quiet", "--tries=1", "--spider", "http://localhost:3000/healthz"]
interval: 5s
timeout: 5s
retries: 3
ingestor:
build:
context: ./ingestor
dockerfile: build/worker/Dockerfile
args:
GO_VERSION: 1.21
ALPINE_VERSION: 3.18
target: final
container_name: ingestor
depends_on:
elasticsearch:
condition: service_healthy
nats:
condition: service_healthy
networks:
- default
hostname: ingestor
deploy:
resources:
limits:
cpus: '0.1'
memory: 100M
restart_policy:
condition: on-failure
delay: 3s
max_attempts: 10
window: 60s
env_file:
- ./environment/ingestor/nats.env
- ./environment/ingestor/service.env
- ./environment/ingestor/worker.env
- ./environment/ingestor/elasticsearch.env
volumes:
# - type: volume
# source: shared-logs
# target: /service/log
# read_only: false
# volume:
# nocopy: false
- type: bind
source: ./logs
target: /service/log
query:
build:
context: ./query
dockerfile: build/api/Dockerfile
args:
GO_VERSION: 1.21
ALPINE_VERSION: 3.18
target: final
container_name: query
depends_on:
elasticsearch:
condition: service_healthy
networks:
- default
hostname: query
ports:
- 3100:3000
deploy:
resources:
limits:
cpus: '0.1'
memory: 100M
restart_policy:
condition: on-failure
delay: 3s
max_attempts: 10
window: 60s
env_file:
- ./environment/query/server.env
- ./environment/query/service.env
- ./environment/query/authorization.env
- ./environment/query/elasticsearch.env
volumes:
# - type: volume
# source: shared-logs
# target: /service/log
# read_only: false
# volume:
# nocopy: false
- type: bind
source: ./logs
target: /service/log
healthcheck:
test: ["CMD", "wget", "--quiet", "--tries=1", "--spider", "http://localhost:3000/healthz"]
interval: 5s
timeout: 5s
retries: 3