From 406ed5fc2c4d25ca0b6492ec5e5f9c56b7b7b755 Mon Sep 17 00:00:00 2001 From: Bryan Joshua Pedini Date: Sun, 19 Mar 2023 12:33:03 +0100 Subject: [PATCH] turned base into grafana deployment --- LICENSE | 2 +- README.md | 3 +-- docker-compose.yml | 7 ++++++- env.example | 14 ++++++++++---- 4 files changed, 18 insertions(+), 8 deletions(-) diff --git a/LICENSE b/LICENSE index fe6f694..614f30c 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2022 Bryan Joshua Pedini +Copyright (c) 2023 Bryan Joshua Pedini Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/README.md b/README.md index 3ffde1e..edc9e2e 100644 --- a/README.md +++ b/README.md @@ -1,2 +1 @@ -# Base App Deployment -This is the base on which (almost) every deployment is sort-of-based on. +# Grafana Deployment diff --git a/docker-compose.yml b/docker-compose.yml index cf8e041..2333478 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,7 +1,10 @@ --- services: - app: + grafana: + image: grafana/${GRAFANA_FLAVOR}:${GRAFANA_VERSION} restart: unless-stopped + environment: + - GF_INSTALL_PLUGINS=${GRAFANA_PLUGINS} labels: ### Section Træfik - traefik.enable=${TRAEFIK_ENABLED} @@ -29,6 +32,8 @@ services: - diun.exclude_tags=${DIUN_EXCLUDE} networks: - traefik + volumes: + - ${GRAFANA_DATA}:/var/lib/grafana networks: traefik: diff --git a/env.example b/env.example index 263f7aa..9a3e692 100644 --- a/env.example +++ b/env.example @@ -1,10 +1,10 @@ # Træfik TRAEFIK_ENABLED=true TRAEFIK_NETWORK=traefik -TRAEFIK_ROUTER=app_example_com -TRAEFIK_SERVICE=app_example_com -TRAEFIK_SERVICE_PORT=80 -TRAEFIK_MATCHRULE=Host(`app.example.com`) +TRAEFIK_ROUTER=grafana_example_com +TRAEFIK_SERVICE=grafana_example_com +TRAEFIK_SERVICE_PORT=3000 +TRAEFIK_MATCHRULE=Host(`grafana.example.com`) TRAEFIK_TLSENABLED=true TRAEFIK_CERTRESOLVER=letsencrypt TRAEFIK_HTTP_MIDDLEWARES=http-to-https @@ -16,3 +16,9 @@ DIUN_WATCHREPO=true DIUN_SORTALGO=semver DIUN_INCLUDE= DIUN_EXCLUDE= + +# Grafana +GRAFANA_FLAVOR=grafana-oss +GRAFANA_VERSION=9.4.3 +GRAFANA_PLUGINS= +GRAFANA_DATA=./data/grafana