-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
132 lines (117 loc) · 4.17 KB
/
docker-compose.yml
File metadata and controls
132 lines (117 loc) · 4.17 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
# =============================================================================
# TelemetryFlow Agent - Docker Compose
# =============================================================================
#
# TelemetryFlow Agent v1.1.9 (Based on OpenTelemetry SDK 1.40.0)
# Community Enterprise Observability Platform (CEOP)
# Copyright (c) 2024-2026 DevOpsCorner Indonesia. All rights reserved.
#
# Features:
# - OTLP export for metrics, traces, and logs
# - Dual endpoint support (v1: OTEL standard, v2: TFO Platform)
# - gRPC and HTTP protocol support
# - Disk-backed buffer for offline resilience
#
# Usage:
# # Start with default .env
# docker-compose up -d
#
# # Build and start
# docker-compose up -d --build
#
# # View logs
# docker-compose logs -f tfo-agent
#
# # Stop
# docker-compose down
#
# =============================================================================
services:
tfo-agent:
container_name: ${CONTAINER_NAME:-tfo-agent}
image: ${IMAGE_NAME:-telemetryflow/telemetryflow-agent}:${IMAGE_TAG:-1.1.9}
build:
context: .
dockerfile: Dockerfile
args:
VERSION: ${VERSION:-1.1.9}
GIT_COMMIT: ${GIT_COMMIT:-unknown}
GIT_BRANCH: ${GIT_BRANCH:-main}
BUILD_TIME: ${BUILD_TIME:-unknown}
hostname: ${AGENT_HOSTNAME:-tfo-agent}
restart: unless-stopped
# Environment variables
environment:
# TelemetryFlow Backend Configuration
- TELEMETRYFLOW_API_ENDPOINT=${TELEMETRYFLOW_API_ENDPOINT:-http://localhost:3100}
- TELEMETRYFLOW_API_KEY_ID=${TELEMETRYFLOW_API_KEY_ID:-}
- TELEMETRYFLOW_API_KEY_SECRET=${TELEMETRYFLOW_API_KEY_SECRET:-}
# OTLP Collector Connection
# TFO Collector endpoint (supports both v1 and v2 endpoints)
- TELEMETRYFLOW_ENDPOINT=${TELEMETRYFLOW_ENDPOINT:-tfo-collector:4317}
- TELEMETRYFLOW_PROTOCOL=${TELEMETRYFLOW_PROTOCOL:-grpc}
# Dual Endpoint Version (v1: OTEL standard, v2: TFO Platform)
- TELEMETRYFLOW_ENDPOINT_VERSION=${TELEMETRYFLOW_ENDPOINT_VERSION:-v2}
# Signal Type Enablement
- TELEMETRYFLOW_METRICS_ENABLED=${TELEMETRYFLOW_METRICS_ENABLED:-true}
- TELEMETRYFLOW_TRACES_ENABLED=${TELEMETRYFLOW_TRACES_ENABLED:-false}
- TELEMETRYFLOW_LOGS_ENABLED=${TELEMETRYFLOW_LOGS_ENABLED:-false}
# Logging
- TELEMETRYFLOW_LOG_LEVEL=${TELEMETRYFLOW_LOG_LEVEL:-info}
- TELEMETRYFLOW_LOG_FORMAT=${TELEMETRYFLOW_LOG_FORMAT:-json}
# Legacy (for backward compatibility)
- COLLECTOR_ENDPOINT=${COLLECTOR_ENDPOINT:-http://tfo-collector:4317}
- LOG_LEVEL=${LOG_LEVEL:-info}
# Port mappings
ports:
- "${OTLP_GRPC_PORT:-4317}:4317" # OTLP gRPC
- "${OTLP_HTTP_PORT:-4318}:4318" # OTLP HTTP
- "${METRICS_PORT:-8888}:8888" # Prometheus metrics
- "${HEALTH_PORT:-13133}:13133" # Health check
- "${REMOTE_WRITE_RECEIVER_PORT:-9091}:9091" # Prometheus Remote Write receiver
# Volume mounts
volumes:
- ./configs/tfo-agent.yaml:/etc/tfo-agent/tfo-agent.yaml:ro
- tfo-agent-buffer:/var/lib/tfo-agent
- tfo-agent-logs:/var/log/tfo-agent
- /var/run/docker.sock:/var/run/docker.sock:ro # Docker 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:-512M}
cpus: "${CPU_LIMIT:-0.5}"
reservations:
memory: 128M
cpus: "0.1"
# Logging
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "3"
# Network
networks:
- telemetryflow
# -----------------------------------------------------------------------------
# Volumes
# -----------------------------------------------------------------------------
volumes:
tfo-agent-buffer:
driver: local
tfo-agent-logs:
driver: local
# -----------------------------------------------------------------------------
# Networks
# -----------------------------------------------------------------------------
networks:
telemetryflow:
driver: bridge
name: telemetryflow-network