-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.e2e.yml
More file actions
68 lines (64 loc) · 2.48 KB
/
Copy pathdocker-compose.e2e.yml
File metadata and controls
68 lines (64 loc) · 2.48 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
# =============================================================================
# TelemetryFlow PHP SDK - End-to-End Test Docker Compose
# =============================================================================
#
# TelemetryFlow PHP SDK - AI-Powered Observability & Incident Response Management (IRM) Platform
# Copyright (c) 2024-2026 Telemetri Data Indonesia. All rights reserved.
#
# Spins up the OTLP collector + the SDK examples and runs the integration test
# suite against a live collector. Used by CI on tag pushes.
#
# Usage:
# docker-compose -f docker-compose.e2e.yml up --abort-on-container-exit --exit-code-from e2e
# =============================================================================
networks:
telemetryflow_e2e_net:
name: telemetryflow_php_sdk_e2e_net
driver: bridge
services:
#----------------------------------------------------------------------------------------------
# OTEL Collector (mock backend for E2E)
#----------------------------------------------------------------------------------------------
otel-collector:
image: otel/opentelemetry-collector-contrib:${OTEL_VERSION:-0.108.0}
container_name: telemetryflow_php_e2e_collector
restart: "no"
command: ["--config=/etc/otelcol-contrib/config.yaml"]
volumes:
- ./configs/otel-collector.yaml:/etc/otelcol-contrib/config.yaml:ro
ports:
- "4317"
- "4318"
healthcheck:
test: ["CMD", "wget", "--spider", "-q", "http://localhost:13133"]
interval: 5s
timeout: 3s
retries: 10
start_period: 5s
networks:
- telemetryflow_e2e_net
#----------------------------------------------------------------------------------------------
# E2E Test Runner
#----------------------------------------------------------------------------------------------
e2e:
build:
context: .
dockerfile: Dockerfile.dev
container_name: telemetryflow_php_e2e_runner
restart: "no"
environment:
- TELEMETRYFLOW_API_KEY_ID=tfk_e2e
- TELEMETRYFLOW_API_KEY_SECRET=tfs_e2e
- TELEMETRYFLOW_ENDPOINT=otel-collector:4317
- TELEMETRYFLOW_SERVICE_NAME=php-e2e-test
- TELEMETRYFLOW_INSECURE=true
- TELEMETRYFLOW_PROTOCOL=http
- TELEMETRYFLOW_E2E=true
depends_on:
otel-collector:
condition: service_healthy
command: >
sh -c "vendor/bin/phpunit --configuration packages/php-native/phpunit.xml.dist
--filter TelemetryPipelineTest"
networks:
- telemetryflow_e2e_net