finish docker compose

This commit is contained in:
Martin Ptáček
2023-04-18 23:03:08 +02:00
parent 5f53e9efa3
commit 42362e8aa0
2 changed files with 20 additions and 5 deletions

View File

@ -0,0 +1,13 @@
# Prometheus global configuration file
global:
scrape_interval: 15s # Set the scrape interval to every 15 seconds. Default is every 1 minute.
evaluation_interval: 15s # Evaluate rules every 15 seconds. The default is every 1 minute.
scrape_configs:
- job_name: "prometheus"
static_configs:
- targets: ["localhost:9090"] # scrape prometheus itself
- job_name: "android phones"
proxy_url: "http://pushprox:8080" #TODO add mobile phones here

View File

@ -1,10 +1,13 @@
# nginx, pushprox, prometheus, grafana stack
# This docker compose file spins up the following containers:
# - nginx reverse proxy
# - prometheus time-series database
# - grafana monitoring dashboard
# - pushprox prometheus proxy for traversing NAT
version: '3.9'
services:
# monitoring dashboard for prometheus
grafana:
container_name: grafana
hostname: grafana
@ -13,7 +16,6 @@ services:
networks:
- common-network
# reverse proxy
nginx:
container_name: nginx
image: nginx:1.23.4
@ -27,7 +29,6 @@ services:
- common-network
restart: on-failure
# proxy for prometheus to traverse NAT
pushprox:
container_name: pushprox
hostname: pushprox
@ -35,12 +36,13 @@ services:
networks:
- common-network
# prometheus time-series database
prometheus:
container_name: prometheus
hostname: prometheus
image: bitnami/prometheus:2.43.0
restart: on-failure
volumes:
- ${PWD}/configuration/prometheus.yaml:/etc/prometheus/prometheus.yml
networks:
- common-network