Skip to content

Commit

Permalink
Add script to start prom exporter process
Browse files Browse the repository at this point in the history
  • Loading branch information
LDiazN committed Feb 20, 2025
1 parent 548b8b9 commit da338b2
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
5 changes: 5 additions & 0 deletions ooniapi/services/reverseproxy/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,9 @@ RUN tar -xzvf ./nginx-prom-exporter/prom-exporter.tar.gz -C ./nginx-prom-exporte
RUN mv ./nginx-prom-exporter/nginx-prometheus-exporter /bin
RUN rm -r nginx-prom-exporter


# Add this script to the entrypoint.d directory so it will be called on startup
COPY scripts/40-start-prom-exporter.sh docker-entrypoint.d
RUN chmod +x docker-entrypoint.d/40-start-prom-exporter.sh

COPY templates/backend-proxy.conf.template /etc/nginx/templates/
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/bash

# This script is used to start the prometheus exporter for nginx.
# More about the exporter here:
# https://github.com/nginx/nginx-prometheus-exporter

nginx-prometheus-exporter --nginx.scrape-uri=http://localhost:8080/stub_status &

0 comments on commit da338b2

Please sign in to comment.