diff --git a/infra/compose/observability.yml b/infra/compose/observability.yml index d8dbb9a..00cdf32 100644 --- a/infra/compose/observability.yml +++ b/infra/compose/observability.yml @@ -35,6 +35,27 @@ services: - PROMETHEUS_SERVER_URL=http://otel-collector:8889 - LOG_LEVEL=info + # ── Prometheus (Metrics Backend) ── + prometheus: + container_name: prometheus + image: prom/prometheus:latest + restart: always + networks: + app-shared-net: + aliases: + - prometheus + ports: + - '9090:9090' + command: + - '--config.file=/etc/prometheus/prometheus.yml' + - '--storage.tsdb.path=/prometheus' + - '--web.console.libraries=/etc/prometheus/console_libraries' + - '--web.console.templates=/etc/prometheus/consoles' + - '--web.enable-lifecycle' + volumes: + - ../../infra/otel/prometheus.yml:/etc/prometheus/prometheus.yml:ro + - prometheus_data:/prometheus + # ── Custom Dashboard (nginx:alpine) ── dashboard: container_name: dashboard @@ -57,6 +78,9 @@ services: otel-collector: condition: service_started +volumes: + prometheus_data: + networks: app-shared-net: name: app-shared-net diff --git a/infra/dashboard/index.html b/infra/dashboard/index.html index 7dd3758..01faf47 100644 --- a/infra/dashboard/index.html +++ b/infra/dashboard/index.html @@ -4,6 +4,7 @@