From ee14997f741e008330630ef34cf56784a2cbbf12 Mon Sep 17 00:00:00 2001 From: ross-weir <29697678+ross-weir@users.noreply.github.com> Date: Wed, 17 Dec 2025 00:34:31 +1100 Subject: [PATCH] use 0.0.0.0 instead of 127.0.0.1 so it can be connected to by external services running in docker --- docker-compose.yml | 44 ++++++++++++++++++++++++++++++++------------ 1 file changed, 32 insertions(+), 12 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index ba748ec..6c8104c 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -4,20 +4,28 @@ services: volumes: - ./prometheus:/etc/prometheus ports: - - "127.0.0.1:${PROMETHEUS_PORT:-9090}:9090" + - "${PROMETHEUS_PORT:-9090}:9090" extra_hosts: - "host.docker.internal:host-gateway" networks: - monitoring-network healthcheck: - test: ["CMD", "wget", "--quiet", "--tries=1", "--spider", "http://localhost:9090/-/healthy"] + test: + [ + "CMD", + "wget", + "--quiet", + "--tries=1", + "--spider", + "http://localhost:9090/-/healthy", + ] interval: 1s timeout: 30s retries: 30 grafana: image: grafana/grafana:11.4.0 ports: - - "127.0.0.1:${GRAFANA_PORT:-3000}:3000" + - "${GRAFANA_PORT:-3000}:3000" volumes: - ./grafana/datasources:/etc/grafana/provisioning/datasources/ - ./grafana/dashboards:/etc/grafana/provisioning/dashboards/ @@ -45,27 +53,39 @@ services: networks: - monitoring-network healthcheck: - test: ["CMD-SHELL", "wget --no-verbose --tries=1 --spider http://localhost:3100/ready || exit 1"] + test: + [ + "CMD-SHELL", + "wget --no-verbose --tries=1 --spider http://localhost:3100/ready || exit 1", + ] interval: 1s timeout: 30s retries: 30 tempo: image: grafana/tempo:2.6.1 - command: [ "-config.file=/etc/tempo.yaml" ] + command: ["-config.file=/etc/tempo.yaml"] volumes: - ./grafana-tempo/tempo.yaml:/etc/tempo.yaml:ro - ./grafana-tempo/data:/tmp/tempo networks: - monitoring-network healthcheck: - test: ["CMD", "wget", "--quiet", "--tries=1", "--spider", "http://localhost:3200/ready"] + test: + [ + "CMD", + "wget", + "--quiet", + "--tries=1", + "--spider", + "http://localhost:3200/ready", + ] interval: 1s timeout: 30s retries: 30 influxdb: image: influxdb:2.7 ports: - - "127.0.0.1:${INFLUX_PORT:-8086}:8086" + - "${INFLUX_PORT:-8086}:8086" environment: - DOCKER_INFLUXDB_INIT_MODE=setup - DOCKER_INFLUXDB_INIT_USERNAME=admin @@ -99,8 +119,8 @@ services: # But callers should specify environment variable to get actual data. - ${ROLLUP_DATA_DIR:-.}:/mnt/rollup:ro ports: - - "127.0.0.1:${TELEGRAF_PORT:-8094}:8094/udp" - - "127.0.0.1:${TELEGRAF_PORT:-8094}:8094/tcp" + - "${TELEGRAF_PORT:-8094}:8094/udp" + - "${TELEGRAF_PORT:-8094}:8094/tcp" environment: - HOST_PROC=/host/proc - HOST_SYS=/host/sys @@ -115,8 +135,8 @@ services: grafana-alloy: image: grafana/alloy:v1.5.1 ports: - - "127.0.0.1:${ALLOY_GRPC_PORT:-4317}:4317" - - "127.0.0.1:${ALLOY_HTTP_PORT:-4318}:4318" + - "${ALLOY_GRPC_PORT:-4317}:4317" + - "${ALLOY_HTTP_PORT:-4318}:4318" volumes: - ./grafana-alloy/config.local.alloy:/etc/alloy/config.alloy - ./grafana-alloy/storage:/var/lib/alloy/data @@ -134,4 +154,4 @@ services: retries: 30 networks: - monitoring-network: \ No newline at end of file + monitoring-network: