forked from open-telemetry/opentelemetry-demo
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcompose.agent.yaml
More file actions
130 lines (124 loc) · 3.21 KB
/
Copy pathcompose.agent.yaml
File metadata and controls
130 lines (124 loc) · 3.21 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
# Copyright The OpenTelemetry Authors
# SPDX-License-Identifier: Apache-2.0
# Agent layer: adds the LLM-powered Agent, MCP, and Chatbot services
# along with the frontend-proxy patches needed to route to the chatbot.
#
# Usage (typical):
# docker compose -f compose.yaml -f compose.full.yaml \
# -f compose.observability.yaml \
# -f compose.agent.yaml \
# -f compose.extras.yaml up
services:
# Agent
agent:
image: ${IMAGE_NAME}:${DEMO_VERSION}-agent
container_name: agent
build:
context: ./
dockerfile: ${AGENT_DOCKERFILE}
deploy:
resources:
limits:
memory: 500M
restart: unless-stopped
ports:
- "${AGENT_PORT}"
volumes:
- ./src/agent/fixtures:/app/fixtures
environment:
- TRACELOOP_BASE_URL
- GRAPH_RECURSION_LIMIT
- MCP_ENDPOINT
- MCP_PORT
- MCP_ENABLED
- AGENT_ENDPOINT
- AGENT_PORT
- LLM_BASE_URL
- LLM_MODEL
- LLM_TLS_VERIFY
- API_KEY
- USE_VCR
- VCR_MATCH_THRESHOLD
- OPENAI_API_KEY=${API_KEY}
- APPLICATION_ENDPOINT
- OTEL_EXPORTER_OTLP_INSECURE=true
- OTEL_RESOURCE_ATTRIBUTES=${OTEL_RESOURCE_ATTRIBUTES},service.criticality=low
- OTEL_SERVICE_NAME=agent
depends_on:
otel-collector:
condition: service_started
product-catalog:
condition: service_started
mcp:
condition: service_started
logging:
driver: "json-file"
options:
max-size: "5m"
max-file: "2"
# MCP
mcp:
image: ${IMAGE_NAME}:${DEMO_VERSION}-mcp
container_name: mcp
build:
context: ./
dockerfile: ${MCP_DOCKERFILE}
deploy:
resources:
limits:
memory: 500M
restart: unless-stopped
ports:
- "${MCP_PORT}"
environment:
- TRACELOOP_BASE_URL
- MCP_ENDPOINT
- MCP_PORT
- OTEL_EXPORTER_OTLP_INSECURE=true
- APPLICATION_ENDPOINT
- OTEL_RESOURCE_ATTRIBUTES=${OTEL_RESOURCE_ATTRIBUTES},service.criticality=low
- OTEL_SERVICE_NAME=mcp
depends_on:
frontend:
condition: service_started
logging:
driver: "json-file"
options:
max-size: "5m"
max-file: "2"
# ChatBot
chatbot:
image: ${IMAGE_NAME}:${DEMO_VERSION}-chatbot
container_name: chatbot
build:
context: ./
dockerfile: ${CHATBOT_DOCKERFILE}
deploy:
resources:
limits:
memory: 500M
restart: unless-stopped
ports:
- "${CHATBOT_PORT}"
environment:
- AGENT_PORT
- AGENT_ENDPOINT
- CHATBOT_PORT
- CHATBOT_ROOT_PATH
- OTEL_RESOURCE_ATTRIBUTES=${OTEL_RESOURCE_ATTRIBUTES},service.criticality=low
- OTEL_SERVICE_NAME=chatbot
- OTEL_EXPORTER_OTLP_ENDPOINT=http://${OTEL_COLLECTOR_HOST}:${OTEL_COLLECTOR_PORT_HTTP}
- OTEL_EXPORTER_OTLP_INSECURE=true
depends_on:
agent:
condition: service_started
logging:
driver: "json-file"
options:
max-size: "5m"
max-file: "2"
# Patch frontend-proxy to expose chatbot host/port and depend on chatbot
frontend-proxy:
depends_on:
chatbot:
condition: service_started