dependency-track/dev/monitoring/compose.yaml
nscuro 3a89117ffa
Add Grafana monitoring for dev setup
Signed-off-by: nscuro <nscuro@protonmail.com>
2026-05-19 16:37:42 +02:00

56 lines
1.8 KiB
YAML

# This file is part of Dependency-Track.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# SPDX-License-Identifier: Apache-2.0
# Copyright (c) OWASP Foundation. All Rights Reserved.
name: dtrack-dev
services:
apiserver:
environment:
DT_METRICS_ENABLED: "true"
prometheus:
image: prom/prometheus:v3.0.1
command:
- "--config.file=/etc/prometheus/prometheus.yml"
- "--storage.tsdb.path=/prometheus"
- "--web.enable-lifecycle"
ports:
- "127.0.0.1:9090:9090"
volumes:
- "./monitoring/prometheus.yml:/etc/prometheus/prometheus.yml:ro"
- "prometheus-data:/prometheus"
restart: unless-stopped
grafana:
image: grafana/grafana:12.1.1
environment:
GF_AUTH_ANONYMOUS_ENABLED: "true"
GF_AUTH_ANONYMOUS_ORG_ROLE: "Admin"
GF_AUTH_DISABLE_LOGIN_FORM: "true"
ports:
- "127.0.0.1:3000:3000"
volumes:
- "./monitoring/grafana/grafana-datasources.yml:/etc/grafana/provisioning/datasources/datasources.yml:ro"
- "./monitoring/grafana/grafana-dashboards.yml:/etc/grafana/provisioning/dashboards/dashboards.yml:ro"
- "./monitoring/grafana/dashboards:/etc/dashboards:ro"
- "grafana-data:/var/lib/grafana"
depends_on:
- prometheus
restart: unless-stopped
volumes:
prometheus-data: {}
grafana-data: {}