From 07be8a8bb8fc0bfeb248466081210f1f5f181a9c Mon Sep 17 00:00:00 2001 From: rov Date: Tue, 16 Dec 2025 22:43:46 -0300 Subject: [PATCH] Add docker-compose.yml --- docker-compose.yml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 docker-compose.yml diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..61e072b --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,21 @@ +services: + prometheus: + image: prom/prometheus:latest + container_name: prometheus + ports: + - "9090:9090" + command: + # Tell Prometheus to use the mounted configuration file + - --config.file=/etc/prometheus/prometheus.yml + # Tell Prometheus where to store its time series data + - --storage.tsdb.path=/prometheus + volumes: + # 1. Mount the local prometheus.yml file into the container's config path + - ./prometheus.yml:/etc/prometheus/prometheus.yml + # 2. Use a named volume for persistent storage of the time series data + - prometheus_data:/prometheus + restart: unless-stopped + +# Define the named volume for persistent data storage +volumes: + prometheus_data: {} \ No newline at end of file