diff --git a/.gitignore b/.gitignore index a904a6f..329ae7e 100644 --- a/.gitignore +++ b/.gitignore @@ -10,3 +10,5 @@ __pycache__/ # virtual environments .venv/ .venv*/ +# .env files +*.env diff --git a/services/compose.env.template b/services/compose.env.template new file mode 100644 index 0000000..1b48124 --- /dev/null +++ b/services/compose.env.template @@ -0,0 +1,2 @@ +GF_SECURITY_ADMIN_USER=admin +GF_SECURITY_ADMIN_PASSWORD=admin diff --git a/services/compose.yaml b/services/compose.yaml index 09c5f6c..38aee7e 100644 --- a/services/compose.yaml +++ b/services/compose.yaml @@ -24,3 +24,25 @@ services: - "--config.file=/etc/prometheus/prometheus.yaml" volumes: - "./prometheus/prometheus.yaml:/etc/prometheus/prometheus.yaml:ro" + + grafana: + image: grafana/grafana:12.4.0-20012734117 + ports: + - "3000:3000" + #environment: + # GF_SECURITY_ADMIN_USER: "$__file{/run/secrets/grafana-admin-user}" + # GF_SECURITY_ADMIN_PASSWORD: "$__file{/run/secrets/grafana-admin-password}" + #secrets: + # - grafana-admin-user + # - grafana-admin-password + environment: + GF_SECURITY_ADMIN_USER: "${GF_SECURITY_ADMIN_USER:-admin}" + GF_SECURITY_ADMIN_PASSWORD: "${GF_SECURITY_ADMIN_PASSWORD:-admin}" + +#secrets: +# +# grafana-admin-user: +# environment: GF_SECURITY_ADMIN_USER +# +# grafana-admin-password: +# environment: GF_SECURITY_ADMIN_PASSWORD