forked from hyperdxio/hyperdx
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.dev.yml
235 lines (235 loc) · 6.65 KB
/
docker-compose.dev.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
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
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
version: '3'
services:
miner:
container_name: hdx-oss-dev-miner
build:
context: .
dockerfile: ./packages/miner/Dockerfile
target: dev
environment:
HYPERDX_API_KEY: ${HYPERDX_API_KEY}
HYPERDX_ENABLE_ADVANCED_NETWORK_CAPTURE: 1
OTEL_EXPORTER_OTLP_ENDPOINT: http://otel-collector:4318
OTEL_LOG_LEVEL: ERROR
OTEL_SERVICE_NAME: hdx-oss-dev-miner
volumes:
- ./packages/miner/src:/app/src
ports:
- 5123:5123
networks:
- internal
hostmetrics:
container_name: hdx-oss-dev-hostmetrics
build:
context: ./docker/hostmetrics
target: dev
volumes:
- ./docker/hostmetrics/config.dev.yaml:/etc/otelcol-contrib/config.yaml
environment:
HYPERDX_API_KEY: ${HYPERDX_API_KEY}
OTEL_SERVICE_NAME: hostmetrics
restart: always
networks:
- internal
ingestor:
container_name: hdx-oss-dev-ingestor
build:
context: ./docker/ingestor
target: dev
volumes:
- ./docker/ingestor:/app
- .volumes/ingestor_data:/var/lib/vector
ports:
- 8002:8002 # http-generic
- 8686:8686 # healthcheck
environment:
RUST_BACKTRACE: full
VECTOR_LOG: debug
VECTOR_OPENSSL_LEGACY_PROVIDER: false
restart: always
networks:
- internal
redis:
image: redis:7.0.11-alpine
container_name: hdx-oss-dev-redis
volumes:
- .volumes/redis:/data
ports:
- 6379:6379
networks:
- internal
db:
image: mongo:5.0.14-focal
container_name: hdx-oss-dev-db
volumes:
- .volumes/db:/data/db
ports:
- 27017:27017
networks:
- internal
otel-collector:
container_name: hdx-oss-dev-otel-collector
build:
context: ./docker/otel-collector
target: dev
volumes:
- ./docker/otel-collector/config.yaml:/etc/otelcol-contrib/config.yaml
ports:
- '13133:13133' # health_check extension
- '1888:1888' # pprof extension
- '24225:24225' # fluentd receiver
- '4317:4317' # OTLP gRPC receiver
- '4318:4318' # OTLP http receiver
- '55679:55679' # zpages extension
- '8888:8888' # metrics extension
- '9411:9411' # zipkin
restart: always
networks:
- internal
aggregator:
container_name: hdx-oss-dev-aggregator
build:
context: .
dockerfile: ./packages/api/Dockerfile
target: dev
ports:
- 8001:8001
environment:
APP_TYPE: 'aggregator'
CLICKHOUSE_HOST: http://ch-server:8123
CLICKHOUSE_PASSWORD: aggregator
CLICKHOUSE_USER: aggregator
FRONTEND_URL: 'http://localhost:8080' # need to be localhost (CORS)
MONGO_URI: 'mongodb://db:27017/hyperdx'
NODE_ENV: development
PORT: 8001
REDIS_URL: redis://redis:6379
SERVER_URL: 'http://localhost:8000'
volumes:
- ./packages/api/src:/app/src
networks:
- internal
depends_on:
- db
- redis
- ch-server
task-check-alerts:
container_name: hdx-oss-dev-task-check-alerts
build:
context: .
dockerfile: ./packages/api/Dockerfile
target: dev
entrypoint: 'yarn'
command: 'dev:task check-alerts'
environment:
APP_TYPE: 'scheduled-task'
CLICKHOUSE_HOST: http://ch-server:8123
CLICKHOUSE_LOG_LEVEL: trace
CLICKHOUSE_PASSWORD: worker
CLICKHOUSE_USER: worker
FRONTEND_URL: 'http://localhost:8080' # need to be localhost (CORS)
HDX_NODE_ADVANCED_NETWORK_CAPTURE: 1
HDX_NODE_BETA_MODE: 0
HDX_NODE_CONSOLE_CAPTURE: 1
HYPERDX_API_KEY: ${HYPERDX_API_KEY}
INGESTOR_API_URL: 'http://ingestor:8002'
MINER_API_URL: 'http://miner:5123'
MONGO_URI: 'mongodb://db:27017/hyperdx'
NODE_ENV: development
OTEL_EXPORTER_OTLP_ENDPOINT: 'http://otel-collector:4318'
OTEL_SERVICE_NAME: 'hdx-oss-dev-task-check-alerts'
REDIS_URL: redis://redis:6379
volumes:
- ./packages/api/src:/app/src
restart: always
networks:
- internal
depends_on:
- ch-server
- db
- redis
api:
container_name: hdx-oss-dev-api
build:
context: .
dockerfile: ./packages/api/Dockerfile
target: dev
ports:
- 8000:8000
environment:
AGGREGATOR_API_URL: 'http://aggregator:8001'
APP_TYPE: 'api'
CLICKHOUSE_HOST: http://ch-server:8123
CLICKHOUSE_LOG_LEVEL: trace
CLICKHOUSE_PASSWORD: api
CLICKHOUSE_USER: api
EXPRESS_SESSION_SECRET: 'hyperdx is cool 👋'
FRONTEND_URL: 'http://localhost:8080' # need to be localhost (CORS)
HDX_NODE_ADVANCED_NETWORK_CAPTURE: 1
HDX_NODE_BETA_MODE: 1
HDX_NODE_CONSOLE_CAPTURE: 1
HYPERDX_API_KEY: ${HYPERDX_API_KEY}
INGESTOR_API_URL: 'http://ingestor:8002'
MINER_API_URL: 'http://miner:5123'
MONGO_URI: 'mongodb://db:27017/hyperdx'
NODE_ENV: development
OTEL_EXPORTER_OTLP_ENDPOINT: 'http://otel-collector:4318'
OTEL_SERVICE_NAME: 'hdx-oss-dev-api'
PORT: 8000
REDIS_URL: redis://redis:6379
SERVER_URL: 'http://localhost:8000'
USAGE_STATS_ENABLED: ${USAGE_STATS_ENABLED:-false}
volumes:
- ./packages/api/src:/app/src
networks:
- internal
depends_on:
- ch-server
- db
- redis
app:
container_name: hdx-oss-dev-app
build:
context: .
dockerfile: ./packages/app/Dockerfile
target: dev
ports:
- 8080:8080
environment:
NEXT_PUBLIC_API_SERVER_URL: 'http://localhost:8000' # need to be localhost (CORS)
NEXT_PUBLIC_HDX_API_KEY: ${HYPERDX_API_KEY}
NEXT_PUBLIC_HDX_COLLECTOR_URL: 'http://localhost:4318'
NEXT_PUBLIC_HDX_SERVICE_NAME: 'hdx-oss-dev-app'
NODE_ENV: development
PORT: 8080
volumes:
- ./packages/app/pages:/app/pages
- ./packages/app/public:/app/public
- ./packages/app/src:/app/src
- ./packages/app/styles:/app/styles
- ./packages/app/mdx.d.ts:/app/mdx.d.ts
- ./packages/app/next-env.d.ts:/app/next-env.d.ts
- ./packages/app/next.config.js:/app/next.config.js
networks:
- internal
depends_on:
- api
ch-server:
image: clickhouse/clickhouse-server:23.7.1-alpine
container_name: hdx-oss-dev-ch-server
ports:
- 8123:8123 # http api
- 9000:9000 # native
environment:
# default settings
CLICKHOUSE_DEFAULT_ACCESS_MANAGEMENT: 1
volumes:
- ./docker/clickhouse/local/config.xml:/etc/clickhouse-server/config.xml
- ./docker/clickhouse/local/users.xml:/etc/clickhouse-server/users.xml
- .volumes/ch_data:/var/lib/clickhouse
- .volumes/ch_logs:/var/log/clickhouse-server
restart: on-failure
networks:
- internal
networks:
internal: