-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.yml
82 lines (77 loc) · 2.01 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
version: "3"
services:
server:
depends_on:
- redis
- rabbitmq
- otel-collector
build:
context: ./
dockerfile: ./Dockerfile
environment:
- BROKER_URL=amqp://admin:mypass@rabbitmq:5672//
- RESULT_BACKEND=redis://redis:6379/0
- OTEL_SERVICE_NAME=foo_server
- OTEL_EXPORTER_OTLP_ENDPOINT=otel-collector:4317
- OTEL_EXPORTER_OTLP_INSECURE=true
ports:
- "8000:8000"
command: opentelemetry-instrument uvicorn main:app --log-level info --proxy-headers --host 0.0.0.0 --port 8000
# command: uvicorn main:app --host 0.0.0.0 --port 8000
worker:
deploy:
replicas: 2
depends_on:
- redis
- rabbitmq
- otel-collector
build:
context: ./
dockerfile: ./Dockerfile
environment:
- BROKER_URL=amqp://admin:mypass@rabbitmq:5672//
- RESULT_BACKEND=redis://redis:6379/0
- C_FORCE_ROOT=true
- OTEL_SERVICE_NAME=foo_worker
- OTEL_EXPORTER_OTLP_ENDPOINT=otel-collector:4317
- OTEL_EXPORTER_OTLP_INSECURE=true
- OTEL_LOG_LEVEL="debug"
command: celery -A task worker --loglevel=info --task-events --concurrency=1
redis:
image: redis
ports:
- "6379:6379"
rabbitmq:
environment:
- RABBITMQ_DEFAULT_USER=admin
- RABBITMQ_DEFAULT_PASS=mypass
image: rabbitmq
ports:
- "5672:5672"
otel-collector:
depends_on:
- jaeger
image: otel/opentelemetry-collector:0.45.0
command:
- --config=/etc/otel/collector-config.yaml
ports:
- "4317:4317"
- "4318:4318"
- "8888:8888"
volumes:
- ${PWD}/local-otel-collector-config.yaml:/etc/otel/collector-config.yaml
environment:
OTEL_LOG_LEVEL: "debug"
jaeger:
image: jaegertracing/all-in-one:latest
environment:
- COLLECTOR_ZIPKIN_HOST_PORT=:9411
ports:
- "5775:5775/udp"
- "6831:6831/udp"
- "6832:6832/udp"
- "5778:5778"
- "16686:16686"
- "14268:14268"
- "14250:14250"
- "9411:9411"