-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yaml
36 lines (35 loc) · 1.04 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
services:
api:
build:
context: .
dockerfile: Dockerfile
ports:
- "8007:8007"
environment:
- PRAGMA_API_KEY=${PRAGMA_API_KEY}
- PRAGMA_API_BASE_URL=${PRAGMA_API_BASE_URL}
- PRAGMA_OTEL_EXPORTER_OTLP_ENDPOINT=http://otel-collector:4317
- PRAGMA_OTEL_SERVICE_NAME=pragma-api
volumes:
- .:/opt/pragma-api
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8007/health"]
interval: 30s
timeout: 10s
retries: 3
start_period: 10s
otel-collector:
image: otel/opentelemetry-collector:latest
command: ["--config=/etc/otel-collector-config.yaml"]
volumes:
- ./config/otel-collector-config.yaml:/etc/otel-collector-config.yaml
ports:
- "4317:4317" # OTLP gRPC receiver
- "4318:4318" # OTLP HTTP receiver
- "8888:8888" # Prometheus metrics
- "8889:8889" # Prometheus exporter
healthcheck:
test: ["CMD", "wget", "--spider", "-q", "localhost:13133"]
interval: 5s
timeout: 5s
retries: 3