diff --git a/prothsync/compose.yaml b/prothsync/compose.yaml index 52149b8..423bbc2 100644 --- a/prothsync/compose.yaml +++ b/prothsync/compose.yaml @@ -27,10 +27,41 @@ services: volumes: - prothSync_redis_data:/data + prometheus: + image: 'prom/prometheus:latest' + container_name: prometheus-prothSync + volumes: + - ./monitoring/prometheus/prometheus.yml:/etc/prometheus/prometheus.yml + - prothSync_prometheus_data:/prometheus + ports: + - "9090:9090" + networks: + - db-net + extra_hosts: + - "host.docker.internal:host-gateway" + + grafana: + image: 'grafana/grafana:latest' + container_name: grafana-prothSync + environment: + GF_SECURITY_ADMIN_USER: ${GRAFANA_ADMIN_USER:-admin} + GF_SECURITY_ADMIN_PASSWORD: ${GRAFANA_ADMIN_PASSWORD:-admin} + TZ: ${TZ} + volumes: + - prothSync_grafana_data:/var/lib/grafana + ports: + - "3000:3000" + networks: + - db-net + depends_on: + - prometheus + networks: db-net: name: db-net volumes: prothSync_postgres_data: - prothSync_redis_data: \ No newline at end of file + prothSync_redis_data: + prothSync_prometheus_data: + prothSync_grafana_data: \ No newline at end of file diff --git a/prothsync/monitoring/prometheus/prometheus.yml b/prothsync/monitoring/prometheus/prometheus.yml index b778f9e..89c55a4 100644 --- a/prothsync/monitoring/prometheus/prometheus.yml +++ b/prothsync/monitoring/prometheus/prometheus.yml @@ -6,6 +6,4 @@ scrape_configs: - job_name: 'prothsync' metrics_path: '/actuator/prometheus' static_configs: - - targets: ['host.docker.internal:8080'] - labels: - application: 'prothsync' \ No newline at end of file + - targets: ['host.docker.internal:8080'] \ No newline at end of file