From a9b25de95af376e837ea4ea171d1a8cb29b2c606 Mon Sep 17 00:00:00 2001 From: Juan Negro Date: Tue, 12 Mar 2024 14:25:46 +0100 Subject: [PATCH] Add docker compose --- docker-compose.yml | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 docker-compose.yml diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..367f40b --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,35 @@ +version: "3.1" + +services: + spring-app: + build: + context: spring-app + dockerfile: Dockerfile + ports: + - 8080:8080 + restart: unless-stopped + + prometheus: + image: prom/prometheus + container_name: prometheus + command: + - "--config.file=/etc/prometheus/prometheus.yml" + ports: + - 9090:9090 + restart: unless-stopped + volumes: + - ./prometheus:/etc/prometheus + - prom_data:/prometheus + grafana: + image: grafana/grafana + container_name: grafana + ports: + - 3000:3000 + restart: unless-stopped + environment: + - GF_SECURITY_ADMIN_USER=admin + - GF_SECURITY_ADMIN_PASSWORD=grafana + volumes: + - ./grafana:/etc/grafana/provisioning/datasources +volumes: + prom_data: