Add docker-compose.yml

This commit is contained in:
rov 2025-12-16 22:43:46 -03:00
parent a81b895c79
commit 07be8a8bb8

21
docker-compose.yml Normal file
View File

@ -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: {}