From 011aa2d61317a5541ab600ee12f4492004abcee1 Mon Sep 17 00:00:00 2001 From: Yuri Lima Date: Mon, 19 May 2025 11:13:31 +0000 Subject: [PATCH] =?UTF-8?q?=F0=9F=91=8C=20IMPROVE:=20Update=20Loki=20servi?= =?UTF-8?q?ce=20configuration=20to=20expand=20environment=20variables=20an?= =?UTF-8?q?d=20fix=20healthcheck=20URL?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docker-compose.yml | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 946b3fe..9ee2b13 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -65,7 +65,11 @@ services: loki: container_name: loki image: docker.io/grafana/loki:3.5.0 - command: "-config.file=/etc/loki/config.yaml" # Tells Grafana Loki to start with the config file. + command: + - "-config.file=/etc/loki/config.yaml" # Tells Grafana Loki to start with the config file. + - "-config.expand-env=true" + ports: + - "3100:3100" volumes: - ./config/loki-config.yaml:/etc/loki/config.yaml:ro - data_loki:/loki:rw @@ -73,7 +77,7 @@ services: - grafana-prometheus restart: unless-stopped healthcheck: - test: ["CMD", "wget", "--spider", "-q", "http://localhost:3100/ready"] + test: ["CMD", "wget", "--spider", "-q", "http://loki:3100/ready"] interval: 10s # check every 10 seconds timeout: 5s # wait max 5 seconds per check retries: 5 # mark as unhealthy after 5 failures @@ -81,7 +85,7 @@ services: https_portal: container_name: https_portal image: "steveltn/https-portal:1.21" - restart: unless-stopped + restart: always networks: - grafana-prometheus ports: @@ -95,6 +99,7 @@ services: CLIENT_MAX_BODY_SIZE: 0 # FORCE_RENEW: 'true' DOMAINS: 'grafana.phx-erp.de -> https://grafana:3000, prometheus.phx-erp.de -> https://prometheus:9090' + # loki-logs.phx-erp.de -> http://localhost:3100 volumes: - ./https_portal/data:/var/lib/https-portal # ssl_certs, vhost.d, htdocs - ./https_portal/log:/var/log/nginx # nginx logs