-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.monitoring
32 lines (24 loc) · 1.03 KB
/
Dockerfile.monitoring
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
FROM prom/prometheus:v2.37.0 as prometheus
FROM grafana/grafana:9.3.2 as grafana
FROM ubuntu:22.04
RUN apt-get update && apt-get install -y curl
# Set environment variables
ENV SERVICE_ENDPOINT=""
ENV SERVICE_PORT=""
# Copy Prometheus files
COPY --from=prometheus /bin/prometheus /bin/prometheus
COPY --from=prometheus /bin/promtool /bin/promtool
COPY prometheus/prometheus.yml /etc/prometheus/prometheus.yml
COPY prometheus/alert.rules /etc/prometheus/alert.rules
# Copy Grafana files
COPY --from=grafana /usr/share/grafana /usr/share/grafana
COPY --from=grafana /etc/grafana /etc/grafana
COPY grafana/grafana.ini /etc/grafana/grafana.ini
COPY grafana/datasources/prometheus.yml /etc/grafana/provisioning/datasources/prometheus.yml
COPY grafana/dashboards/default.yml /etc/grafana/provisioning/dashboards/default.yml
COPY grafana/dashboards/erpc.json /etc/grafana/provisioning/dashboards/erpc.json
# Set up entrypoint script
COPY scripts/entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh
EXPOSE 3000 9090
ENTRYPOINT ["/entrypoint.sh"]