From aa52e6c6abef5b26099279acd12608311c26cc64 Mon Sep 17 00:00:00 2001 From: Daniel Villavicencio Date: Mon, 20 May 2024 18:49:56 -0700 Subject: [PATCH] Final commit for this branch --- .gitignore | 1 - compose.yml | 15 +++-- src/main/resources/logback-spring.xml | 79 ++++++++++++--------------- 3 files changed, 46 insertions(+), 49 deletions(-) diff --git a/.gitignore b/.gitignore index 25bb938..9daaf23 100644 --- a/.gitignore +++ b/.gitignore @@ -5,7 +5,6 @@ build/ !**/src/test/**/build/ \\ \\.pub -compose.yml ### STS ### .apt_generated diff --git a/compose.yml b/compose.yml index f82c64a..e40bd68 100644 --- a/compose.yml +++ b/compose.yml @@ -48,16 +48,14 @@ services: grafana: container_name: grafana environment: - - GF_PATHS_PROVISIONING=/etc/grafana/provisioning - - GF_AUTH_ANONYMOUS_ENABLED=true - - GF_AUTH_ANONYMOUS_ORG_ROLE=Admin + GF_SECURITY_ADMIN_USER__FILE: /run/secrets/grafana_admin_username + GF_SECURITY_ADMIN_PASSWORD__FILE: /run/secrets/grafana_admin_password entrypoint: - sh - -euc - | mkdir -p /etc/grafana/provisioning/datasources cat < /etc/grafana/provisioning/datasources/ds.yaml - apiVersion: 1 datasources: - name: Loki type: loki @@ -73,6 +71,9 @@ services: image: grafana/grafana-oss:latest ports: - "3000:3000" + secrets: + - "grafana_admin_username" + - "grafana_admin_password" secrets: mongo_username: @@ -94,4 +95,8 @@ secrets: bungie_client_id: environment: "BUNGIE_CLIENT_ID" bungie_client_secret: - environment: "BUNGIE_CLIENT_SECRET" \ No newline at end of file + environment: "BUNGIE_CLIENT_SECRET" + grafana_admin_username: + environment: "GRAFANA_ADMIN_USERNAME" + grafana_admin_password: + environment: "GRAFANA_ADMIN_PASSWORD" \ No newline at end of file diff --git a/src/main/resources/logback-spring.xml b/src/main/resources/logback-spring.xml index 238c56b..2a7c80f 100644 --- a/src/main/resources/logback-spring.xml +++ b/src/main/resources/logback-spring.xml @@ -1,49 +1,42 @@ - - - - - - http://localhost:3100/loki/api/v1/push - - - - - %-5level [%.5(${HOSTNAME})] %.10thread %logger{20} | %msg %ex - - - - - - - - + + + + + http://localhost:3100/loki/api/v1/push + + + + + %-5level [%.5(${HOSTNAME})] %.10thread %logger{20} | %msg %ex + + + - - - - - http://loki:3100/loki/api/v1/push - - - - - %-5level [%.5(${HOSTNAME})] %.10thread %logger{20} | %msg %ex - - - - - - - + + + + + http://loki:3100/loki/api/v1/push + + + + + %-5level [%.5(${HOSTNAME})] %.10thread %logger{20} | %msg %ex + + + + + + - \ No newline at end of file +