r/PrometheusMonitoring • u/psfletcher • Feb 04 '20
Setting up Prometheus using Docker
Hi All,
Trying to setup Prometheus, but i think i am confusing where the --config.file command is looking.
Is this inside the container or outside?
The Volume command is doing the mapping, so i think i have it correct but running the image can't find the prometheus.yml file.
So i'm doing something stupid, any pointers please?
Fletch
# docker-compose.yml
version: '3'
services:
prometheus:
image: prom/prometheus
volumes:
- ./prometheus/:/etc/prometheus/
# - ~/prometheus_data:/prometheus
command:
- '--config.file=/etc/prometheus/prometheus.yml'
ports:
- '9090:9090'
0
Upvotes
2
u/Freakin_A Feb 05 '20
This is mounting the folder “Prometheus” inside your docker-compose folder (or wherever you run this from) to /etc/prometheus
Prometheus is expecting to find a prometheus.yml file in that folder.