-
Notifications
You must be signed in to change notification settings - Fork 66
/
docker-compose.yaml
122 lines (114 loc) 路 3.07 KB
/
docker-compose.yaml
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
version: '3'
services:
your-api:
build: ./your-api
extra_hosts:
- "host.docker.internal:host-gateway"
environment:
- YOUR_API_PORT=10013
- OTEL_SERVICE_NAME=your-api
- OTEL_EXPORTER_GRPC_URL=http://otel-collector:4317
- WALLET_API_ENDPOINT=http://wallet:10010/wallet
- PAYMENT_EXECUTOR_API_ENDPOINT=http://payment-executor:10012/payment/execute
ports:
- 10013:10013
depends_on:
- otel-collector
- payment-executor
- wallet
payment-executor:
build: ./payment-executor-api
extra_hosts:
- "host.docker.internal:host-gateway"
environment:
- PAYMENT_EXECUTOR_API_PORT=10012
- OTEL_SERVICE_NAME=payment-executor-api
- OTEL_EXPORTER_HTTP_URL=http://otel-collector:4318/v1/traces
- RISK_ANALYSIS_URL=http://risk-analysis:10011/computeRisk
ports:
- 10012:10012
depends_on:
- otel-collector
- risk-analysis
risk-analysis:
build: ./risk-analysis-api
extra_hosts:
- "host.docker.internal:host-gateway"
environment:
- RISK_ANALYSIS_API_PORT=10011
- OTEL_SERVICE_NAME=risk-analysis-api
- OTEL_EXPORTER_GRPC_URL=otel-collector:4317
ports:
- 10011:10011
depends_on:
- otel-collector
wallet:
build: ./wallet-api
extra_hosts:
- "host.docker.internal:host-gateway"
environment:
- WALLET_API_PORT=10010
- OTEL_SERVICE_NAME=wallet-api
- OTEL_EXPORTER_GRPC_URL=http://otel-collector:4317
ports:
- 10010:10010
depends_on:
- otel-collector
tracetest:
image: kubeshop/tracetest:latest
platform: linux/amd64
volumes:
- type: bind
source: ./tracetest/tracetest-config.yaml
target: /app/tracetest.yaml
- type: bind
source: ./tracetest/tracetest-provision.yaml
target: /app/provisioning.yaml
ports:
- 11633:11633
command: --provisioning-file /app/provisioning.yaml
depends_on:
postgres:
condition: service_healthy
otel-collector:
condition: service_started
your-api:
condition: service_started
healthcheck:
test: ["CMD", "wget", "--spider", "localhost:11633"]
interval: 1s
timeout: 3s
retries: 60
environment:
TRACETEST_DEV: ${TRACETEST_DEV}
postgres:
image: postgres:14
environment:
POSTGRES_PASSWORD: postgres
POSTGRES_USER: postgres
healthcheck:
test: pg_isready -U "$$POSTGRES_USER" -d "$$POSTGRES_DB"
interval: 1s
timeout: 5s
retries: 60
otel-collector:
image: otel/opentelemetry-collector-contrib:0.59.0
command:
- "--config"
- "/otel-local-config.yaml"
volumes:
- ./tracetest/collector.config.yaml:/otel-local-config.yaml
depends_on:
- jaeger
jaeger:
image: jaegertracing/all-in-one:1.48.0
restart: unless-stopped
ports:
- 16686:16686
environment:
- COLLECTOR_OTLP_ENABLED=true
healthcheck:
test: ["CMD", "wget", "--spider", "localhost:16686"]
interval: 1s
timeout: 3s
retries: 60