-
Notifications
You must be signed in to change notification settings - Fork 12
/
docker-compose.dev.yml
118 lines (110 loc) · 3.39 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
version: '3'
services:
user-simulator:
build: user-simulator
env_file: user-simulator/.env
environment:
NODE_ENV: development
JAEGER_SERVICE_NAME: user-simulator
JAEGER_AGENT_HOST: jaeger-agent
JAEGER_AGENT_PORT: 6832
JAEGER_SAMPLER_TYPE: const
JAEGER_SAMPLER_PARAM: 1
depends_on:
- api-server
- log-shipper
ports:
- "9230:9229" # nodejs debugging port
command: wait.sh http://api-server:3000/health 5 20 "nodemon --inspect=0.0.0.0 ."
volumes:
- ./user-simulator/src:/usr/src/app
networks:
- aparnet
api-server:
build: api-server
env_file: api-server/.env
environment:
#todo: change syntax to 'var: val'
PORT: 3000
JAEGER_SERVICE_NAME: api-server
# https://www.jaegertracing.io/docs/1.11/sampling/#client-sampling-configuration
JAEGER_SAMPLER_TYPE: const
JAEGER_SAMPLER_PARAM: 1
# by default, jaeger-client sends traces to an agent on localhost:6832
# override and send traces to http://tracing-backend:6832
JAEGER_AGENT_HOST: jaeger-agent
JAEGER_AGENT_PORT: 6832
ports:
- "3000:3000" # for receiving api requests
- "9229:9229" # nodejs debugging port
# override the dockerfile startup command to:
# 1) restart on file changes using nodemon
# 2) start nodejs in debug mode and allow connections from all IPs
# our healthcheck hack is to request the current sampling strategy.
command: wait.sh http://jaeger-agent:5778?service 5 20 "nodemon --inspect=0.0.0.0 ."
volumes:
- ./api-server/src:/usr/src/app
networks:
- aparnet
depends_on:
- log-shipper
- jaeger-agent
log-shipper:
build: log-shipper
ports:
- "24224:24224"
- "24224:24224/udp"
env_file: log-shipper/.env
jaeger-agent:
build: jaeger-agent
environment:
# more options: https://www.jaegertracing.io/docs/1.11/deployment/#all-options-1
REPORTER_TYPE: grpc
REPORTER_GRPC_HOST_PORT: jaeger-collector:14250
PROCESSOR_JAEGER_BINARY_SERVER_HOST_PORT: :6832
command: wait.sh http://jaeger-collector:14269 5 20 "jaeger-agent"
ports:
- "6832:6832" # receiving traces via UDP
- "5778:5778" # get sampling strategies
networks:
- aparnet
depends_on:
- jaeger-collector
jaeger-collector:
build: jaeger-collector
environment:
# more options: https://www.jaegertracing.io/docs/1.11/deployment/#all-options-1
SPAN_STORAGE_TYPE: elasticsearch
ES_SERVER_URLS: http://elasticsearch:9200
restart: on-failure
# todo: eliminate duplication of health-check url in 'command'
command: wait.sh http://elasticsearch:9200 5 20 "jaeger-collector"
ports:
- "14269:14269" # healthcheck
- "14250:14250" # for receiving spans via grpc
networks:
- aparnet
depends_on:
- elasticsearch
jaeger-query:
build: jaeger-query
environment:
SPAN_STORAGE_TYPE: elasticsearch
ES_SERVER_URLS: http://elasticsearch:9200
ports:
- "16686:16686" # provides UI
- "16687:16687" # healthcheck
networks:
- aparnet
command: wait.sh http://elasticsearch:9200 5 20 "jaeger-query"
depends_on:
- elasticsearch
elasticsearch:
image: elasticsearch:5.6-alpine
ports:
- "9200:9200" # server listens here
- "9300:9300"
networks:
- aparnet
networks:
aparnet: