-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathDockerfile
More file actions
20 lines (16 loc) · 785 Bytes
/
Dockerfile
File metadata and controls
20 lines (16 loc) · 785 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# Specify a different Prometheus version as needed
ARG PROMETHEUS_VERSION=2.52.0
# Use the official Prometheus base image
FROM prom/prometheus:v${PROMETHEUS_VERSION}
# Apply this repo's prometheus.yml file
ADD prometheus.yml /etc/prometheus/
# Sets the Render service name in prometheus.yml
# using the RENDER_SERVICE_NAME environment variable
ARG RENDER_SERVICE_NAME
RUN sed -i "s/RENDER_SERVICE_NAME/${RENDER_SERVICE_NAME}/g" /etc/prometheus/prometheus.yml
# Sets the storage path to your persistent disk path,
# plus other config
CMD [ "--storage.tsdb.path=/var/data/prometheus", \
"--config.file=/etc/prometheus/prometheus.yml", \
"--web.console.libraries=/usr/share/prometheus/console_libraries", \
"--web.console.templates=/usr/share/prometheus/consoles" ]