-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
140 lines (131 loc) · 3.65 KB
/
docker-compose.yml
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
134
135
136
137
138
139
140
# Copyright The OpenTelemetry Authors
# SPDX-License-Identifier: Apache-2.0
x-default-logging: &logging
driver: "json-file"
options:
max-size: "5m"
max-file: "2"
tag: "{{.Name}}"
networks:
default:
name: pythia-otelemetry
driver: bridge
services:
# ********************
# Telemetry Components
# ********************
# Jaeger
jaeger:
image: ${JAEGERTRACING_IMAGE}
container_name: jaeger
command:
- "--memory.max-traces=5000"
- "--query.base-path=/jaeger/ui"
- "--prometheus.server-url=http://${PROMETHEUS_ADDR}"
- "--prometheus.query.normalize-calls=true"
- "--prometheus.query.normalize-duration=true"
deploy:
resources:
limits:
memory: 400M
restart: unless-stopped
ports:
- "${JAEGER_SERVICE_PORT}" # Jaeger UI
- "${OTEL_COLLECTOR_PORT_GRPC}"
- "6831:6831/udp"
environment:
- METRICS_STORAGE_TYPE=prometheus
logging: *logging
# OpenTelemetry Collector
otelcol:
image: ${COLLECTOR_CONTRIB_IMAGE}
container_name: otel-col
deploy:
resources:
limits:
memory: 200M
restart: unless-stopped
command: [ "--config=/etc/otelcol-config.yml" ]
user: 0:0
volumes:
- ./configurations/opentelemetry/otelcol-config.yml:/etc/otelcol-config.yml
ports:
- "${OTEL_COLLECTOR_PORT_GRPC}"
- "${OTEL_COLLECTOR_PORT_HTTP}:${OTEL_COLLECTOR_PORT_HTTP}"
depends_on:
- jaeger
logging: *logging
environment:
- TZ=UTC
- ENVOY_PORT
- HOST_FILESYSTEM
- OTEL_COLLECTOR_HOST
- OTEL_COLLECTOR_PORT_GRPC
- OTEL_COLLECTOR_PORT_HTTP
prometheus:
image: ${PROMETHEUS_IMAGE}
container_name: prometheus
command:
- --web.console.templates=/etc/prometheus/consoles
- --web.console.libraries=/etc/prometheus/console_libraries
- --storage.tsdb.retention.time=1h
- --config.file=/etc/prometheus/prometheus-config.yaml
- --storage.tsdb.path=/prometheus
- --web.enable-lifecycle
- --web.route-prefix=/
- --enable-feature=exemplar-storage
- --enable-feature=otlp-write-receiver
volumes:
- ./configurations/prometheus/prometheus-config.yml:/etc/prometheus/prometheus-config.yaml
deploy:
resources:
limits:
memory: 300M
restart: unless-stopped
ports:
- "${PROMETHEUS_SERVICE_PORT}:${PROMETHEUS_SERVICE_PORT}"
logging: *logging
# Grafana
grafana:
image: grafana/grafana:latest
container_name: grafana
depends_on:
- prometheus
environment:
- GF_SECURITY_ADMIN_USER=admin # Default admin user
- GF_SECURITY_ADMIN_PASSWORD=admin # Default admin password
volumes:
- ./grafana:/var/lib/grafana # Persist Grafana data
ports:
- "3000:3000" # Grafana UI exposed on port 3000
logging: *logging
restart: unless-stopped
networks:
- default
pythia-backend:
build: .
container_name: wisecube-pythia
environment:
- TZ=UTC
- "OPENAI_API_KEY=${OPENAI_API_KEY}"
- "MODEL_BASE_URL=${MODEL_BASE_URL}"
- "MODEL_NAME=${MODEL_NAME}"
- "READ_INTERVAL=${READ_INTERVAL}"
- "JAEGER_HOST=${JAEGER_SERVICE_HOST}"
- "JAEGER_PORT=${JAEGER_AGENT_PORT}"
- "JAEGER_SERVICE_NAME=${JAEGER_SERVICE_NAME}"
- "JAEGER_SERVICE_PORT=${JAEGER_SERVICE_PORT}"
ports:
- "8008:8008"
restart: always
pythia-model:
build:
context: .
dockerfile: configurations/model/Dockerfile
args:
MODEL_URL: "${MODEL_URL}"
MODEL_FILE: "${MODEL_FILE}"
container_name: pythia-model
ports:
- 8080:8080
restart: always