diff --git a/server/configuration/nginx.conf b/server/configuration/nginx.conf index f37637f..2231751 100644 --- a/server/configuration/nginx.conf +++ b/server/configuration/nginx.conf @@ -9,15 +9,15 @@ http{ # Upstream server definitions upstream prometheus{ - server http://prometheus:9090; + server prometheus:9090; } upstream pushprox{ - server http://pushprox:8080; + server pushprox:8080; } upstream grafana{ - server http://grafana:3000; + server grafana:3000; } # Grafana server configuration diff --git a/server/docker-compose.yaml b/server/docker-compose.yaml index d1a8bfb..80bc7e8 100644 --- a/server/docker-compose.yaml +++ b/server/docker-compose.yaml @@ -7,6 +7,7 @@ services: # monitoring dashboard for prometheus grafana: container_name: grafana + hostname: grafana image: grafana/grafana:8.5.22 restart: on-failure networks: @@ -16,19 +17,29 @@ services: nginx: container_name: nginx image: nginx:1.23.4 + volumes: + - ${PWD}/configuration/nginx.conf:/etc/nginx/nginx.conf + ports: + - 3000:3000 # grafana port + - 8080:8080 # pushprox port + - 9090:9090 # prometheus UI port networks: - common-network + restart: on-failure # proxy for prometheus to traverse NAT pushprox: + container_name: pushprox + hostname: pushprox image: prometheuscommunity/pushprox:master + networks: + - common-network # prometheus time-series database prometheus: container_name: prometheus + hostname: prometheus image: bitnami/prometheus:2.43.0 - volumes: - - ./ restart: on-failure networks: - common-network