forked from mtusi2026/mtusi2026lab5
lab6
This commit is contained in:
@@ -1,4 +1,80 @@
|
||||
services:
|
||||
otel-collector:
|
||||
image: otel/opentelemetry-collector-contrib:0.115.1
|
||||
command: ['--config=/etc/otel/collector.yaml']
|
||||
volumes:
|
||||
- ./infra/otel/collector.yaml:/etc/otel/collector.yaml:ro
|
||||
networks:
|
||||
- backend
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '${OTEL_CPU_LIMIT:-0.5}'
|
||||
memory: '${OTEL_MEMORY_LIMIT:-256M}'
|
||||
|
||||
prometheus:
|
||||
image: prom/prometheus:v3.1.0
|
||||
command:
|
||||
- '--config.file=/etc/prometheus/prometheus.yml'
|
||||
- '--storage.tsdb.path=/prometheus'
|
||||
- '--storage.tsdb.retention.time=15d'
|
||||
volumes:
|
||||
- ./infra/prometheus.yml:/etc/prometheus/prometheus.yml:ro
|
||||
- prometheus_data:/prometheus
|
||||
networks:
|
||||
- backend
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
memory: '${PROMETHEUS_MEMORY_LIMIT:-512M}'
|
||||
|
||||
loki:
|
||||
image: grafana/loki:3.3.2
|
||||
command: ['-config.file=/etc/loki/loki.yaml']
|
||||
volumes:
|
||||
- ./infra/loki.yaml:/etc/loki/loki.yaml:ro
|
||||
- loki_data:/loki
|
||||
networks:
|
||||
- backend
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
memory: '${LOKI_MEMORY_LIMIT:-512M}'
|
||||
|
||||
tempo:
|
||||
image: grafana/tempo:2.6.1
|
||||
command: ['-config.file=/etc/tempo/tempo.yaml']
|
||||
volumes:
|
||||
- ./infra/tempo.yaml:/etc/tempo/tempo.yaml:ro
|
||||
- tempo_data:/var/tempo
|
||||
networks:
|
||||
- backend
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
memory: '${TEMPO_MEMORY_LIMIT:-512M}'
|
||||
|
||||
grafana:
|
||||
image: grafana/grafana:11.4.0
|
||||
environment:
|
||||
GF_AUTH_ANONYMOUS_ENABLED: 'true'
|
||||
GF_AUTH_ANONYMOUS_ORG_ROLE: Viewer
|
||||
GF_SECURITY_ADMIN_PASSWORD: ${GRAFANA_ADMIN_PASSWORD:-lab-admin}
|
||||
volumes:
|
||||
- ./infra/grafana-datasources.yaml:/etc/grafana/provisioning/datasources/datasources.yaml:ro
|
||||
- ./infra/grafana-dashboards.yaml:/etc/grafana/provisioning/dashboards/dashboards.yaml:ro
|
||||
- ./grafana-messenger.json:/var/lib/grafana/dashboards/messenger.json:ro
|
||||
- grafana_data:/var/lib/grafana
|
||||
ports:
|
||||
- '${GRAFANA_PORT:-3000}:3000'
|
||||
networks:
|
||||
- frontend
|
||||
- backend
|
||||
depends_on:
|
||||
- prometheus
|
||||
- loki
|
||||
- tempo
|
||||
|
||||
postgres:
|
||||
image: postgres:16.8-alpine
|
||||
environment:
|
||||
@@ -132,6 +208,8 @@ services:
|
||||
BROKER_STREAM: attachment.jobs
|
||||
JOB_MAX_ATTEMPTS: ${JOB_MAX_ATTEMPTS:-5}
|
||||
JOB_TIMEOUT_SECONDS: ${JOB_TIMEOUT_SECONDS:-60}
|
||||
OTEL_EXPORTER_OTLP_ENDPOINT: http://otel-collector:4317
|
||||
SERVICE_VERSION: ${SERVICE_VERSION:-1.6.0}
|
||||
secrets:
|
||||
- database_url
|
||||
- s3_access_key_id
|
||||
@@ -182,6 +260,8 @@ services:
|
||||
JOB_TIMEOUT_SECONDS: ${JOB_TIMEOUT_SECONDS:-60}
|
||||
BROKER_PREFETCH: ${BROKER_PREFETCH:-1}
|
||||
WORKER_CONCURRENCY: ${WORKER_CONCURRENCY:-2}
|
||||
OTEL_EXPORTER_OTLP_ENDPOINT: http://otel-collector:4317
|
||||
SERVICE_VERSION: ${SERVICE_VERSION:-1.6.0}
|
||||
secrets:
|
||||
- database_url
|
||||
- s3_access_key_id
|
||||
@@ -238,6 +318,10 @@ volumes:
|
||||
postgres_data:
|
||||
redis_data:
|
||||
minio_data:
|
||||
prometheus_data:
|
||||
loki_data:
|
||||
tempo_data:
|
||||
grafana_data:
|
||||
|
||||
secrets:
|
||||
postgres_password:
|
||||
|
||||
Reference in New Issue
Block a user