-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
133 lines (123 loc) · 4.38 KB
/
docker-compose.yml
File metadata and controls
133 lines (123 loc) · 4.38 KB
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
# =============================================================================
# TelemetryFlow Collector - Docker Compose
# =============================================================================
#
# TelemetryFlow Collector - Community Enterprise Observability Platform (CEOP)
# Copyright (c) 2024-2026 DevOpsCorner Indonesia. All rights reserved.
#
# This docker-compose uses the Direct Go Build with TFO components.
#
# Usage:
# # Start with default .env
# docker-compose up -d
#
# # Build and start
# docker-compose up -d --build
#
# # View logs
# docker-compose logs -f tfo-collector
#
# # Stop
# docker-compose down
#
# =============================================================================
# OTLP HTTP Endpoints (v1 + v2 on same port 4318)
# =============================================================================
#
# v1 Endpoints (Community/Open - NO AUTH REQUIRED):
# POST http://localhost:4318/v1/traces
# POST http://localhost:4318/v1/metrics
# POST http://localhost:4318/v1/logs
#
# v2 Endpoints (TFO Platform - AUTH REQUIRED):
# Headers: X-TelemetryFlow-Key-ID, X-TelemetryFlow-Key-Secret
# POST http://localhost:4318/v2/traces
# POST http://localhost:4318/v2/metrics
# POST http://localhost:4318/v2/logs
#
# gRPC (Both versions via same port):
# localhost:4317
#
# =============================================================================
services:
tfo-collector:
container_name: ${CONTAINER_NAME:-tfo-collector}
image: ${IMAGE_NAME:-telemetryflow/telemetryflow-collector}:${IMAGE_TAG:-1.1.8}
build:
context: .
dockerfile: Dockerfile
args:
VERSION: ${VERSION:-1.1.8}
GIT_COMMIT: ${GIT_COMMIT:-unknown}
GIT_BRANCH: ${GIT_BRANCH:-main}
BUILD_TIME: ${BUILD_TIME:-unknown}
OTEL_VERSION: ${OTEL_VERSION:-0.147.0}
hostname: ${TELEMETRYFLOW_COLLECTOR_NAME:-tfo-collector}
restart: unless-stopped
# Environment variables for TFO components
environment:
# TFO Auth Extension (tfoauth)
- TELEMETRYFLOW_API_KEY_ID=${TELEMETRYFLOW_API_KEY_ID:-}
- TELEMETRYFLOW_API_KEY_SECRET=${TELEMETRYFLOW_API_KEY_SECRET:-}
- TELEMETRYFLOW_ENDPOINT=${TELEMETRYFLOW_ENDPOINT:-https://api.telemetryflow.id}
# TFO Identity Extension (tfoidentity)
- TELEMETRYFLOW_COLLECTOR_ID=${TELEMETRYFLOW_COLLECTOR_ID:-}
- TELEMETRYFLOW_COLLECTOR_NAME=${TELEMETRYFLOW_COLLECTOR_NAME:-TelemetryFlow Collector}
- TELEMETRYFLOW_ENVIRONMENT=${TELEMETRYFLOW_ENVIRONMENT:-production}
- TELEMETRYFLOW_DATACENTER=${TELEMETRYFLOW_DATACENTER:-default}
# Logging
- LOG_LEVEL=${LOG_LEVEL:-info}
# Port mappings
ports:
- "${OTLP_GRPC_PORT:-4317}:4317" # OTLP gRPC
- "${OTLP_HTTP_PORT:-4318}:4318" # OTLP HTTP (v1 + v2)
- "${METRICS_PORT:-8888}:8888" # Prometheus metrics (self)
- "${PROMETHEUS_EXPORTER_PORT:-8889}:8889" # Prometheus exporter
- "${HEALTH_PORT:-13133}:13133" # Health check
- "${ZPAGES_PORT:-55679}:55679" # zPages
- "${PPROF_PORT:-1777}:1777" # pprof
# Volume mounts
volumes:
- ./configs/tfo-collector.yaml:/etc/tfo-collector/tfo-collector.yaml:ro
- tfo-collector-queue:/var/lib/tfo-collector
- tfo-collector-logs:/var/log/tfo-collector
# Health check
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:13133/"]
interval: 30s
timeout: 10s
retries: 3
start_period: 15s
# Resource limits
deploy:
resources:
limits:
memory: ${MEMORY_LIMIT:-2G}
cpus: "${CPU_LIMIT:-2.0}"
reservations:
memory: 512M
cpus: "0.5"
# Logging
logging:
driver: "json-file"
options:
max-size: "50m"
max-file: "5"
# Network
networks:
- telemetryflow
# -----------------------------------------------------------------------------
# Volumes
# -----------------------------------------------------------------------------
volumes:
tfo-collector-queue:
driver: local
tfo-collector-logs:
driver: local
# -----------------------------------------------------------------------------
# Networks
# -----------------------------------------------------------------------------
networks:
telemetryflow:
driver: bridge
name: telemetryflow-network