From 50592115740760b6a7e0c4486b002b6ebbeae9ce Mon Sep 17 00:00:00 2001 From: Atlaskor Date: Tue, 18 Nov 2025 17:31:09 +0000 Subject: [PATCH] Add docker-compose.yml --- docker-compose.yml | 45 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 docker-compose.yml diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..a454d66 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,45 @@ +version: "3.8" + +services: + prometheus: + image: prom/prometheus:latest + container_name: prometheus + volumes: + - ./prometheus/prometheus.yml:/etc/prometheus/prometheus.yml:ro + - prometheus_data:/prometheus + command: + - "--config.file=/etc/prometheus/prometheus.yml" + - "--storage.tsdb.path=/prometheus" + - "--storage.tsdb.retention.time=15d" + - "--web.enable-lifecycle" + ports: + - "9090:9090" + networks: + - monitoring + restart: unless-stopped + + grafana: + image: grafana/grafana-oss:latest + container_name: grafana + environment: + - GF_SECURITY_ADMIN_USER=admin + - GF_SECURITY_ADMIN_PASSWORD=admin + # optional but handy + - GF_SERVER_DOMAIN=localhost + - GF_SERVER_ROOT_URL=%(protocol)s://%(domain)s:%(http_port)s/ + volumes: + - grafana_data:/var/lib/grafana + ports: + - "3000:3000" + networks: + - monitoring + depends_on: + - prometheus + restart: unless-stopped + +networks: + monitoring: + +volumes: + prometheus_data: + grafana_data: