turned base into grafana deployment

This commit is contained in:
Bryan Joshua Pedini 2023-03-19 12:33:03 +01:00
parent 5ed1af1f7f
commit 406ed5fc2c
4 changed files with 18 additions and 8 deletions

View File

@ -1,6 +1,6 @@
MIT License 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 Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal of this software and associated documentation files (the "Software"), to deal

View File

@ -1,2 +1 @@
# Base App Deployment # Grafana Deployment
This is the base on which (almost) every deployment is sort-of-based on.

View File

@ -1,7 +1,10 @@
--- ---
services: services:
app: grafana:
image: grafana/${GRAFANA_FLAVOR}:${GRAFANA_VERSION}
restart: unless-stopped restart: unless-stopped
environment:
- GF_INSTALL_PLUGINS=${GRAFANA_PLUGINS}
labels: labels:
### Section Træfik ### Section Træfik
- traefik.enable=${TRAEFIK_ENABLED} - traefik.enable=${TRAEFIK_ENABLED}
@ -29,6 +32,8 @@ services:
- diun.exclude_tags=${DIUN_EXCLUDE} - diun.exclude_tags=${DIUN_EXCLUDE}
networks: networks:
- traefik - traefik
volumes:
- ${GRAFANA_DATA}:/var/lib/grafana
networks: networks:
traefik: traefik:

View File

@ -1,10 +1,10 @@
# Træfik # Træfik
TRAEFIK_ENABLED=true TRAEFIK_ENABLED=true
TRAEFIK_NETWORK=traefik TRAEFIK_NETWORK=traefik
TRAEFIK_ROUTER=app_example_com TRAEFIK_ROUTER=grafana_example_com
TRAEFIK_SERVICE=app_example_com TRAEFIK_SERVICE=grafana_example_com
TRAEFIK_SERVICE_PORT=80 TRAEFIK_SERVICE_PORT=3000
TRAEFIK_MATCHRULE=Host(`app.example.com`) TRAEFIK_MATCHRULE=Host(`grafana.example.com`)
TRAEFIK_TLSENABLED=true TRAEFIK_TLSENABLED=true
TRAEFIK_CERTRESOLVER=letsencrypt TRAEFIK_CERTRESOLVER=letsencrypt
TRAEFIK_HTTP_MIDDLEWARES=http-to-https TRAEFIK_HTTP_MIDDLEWARES=http-to-https
@ -16,3 +16,9 @@ DIUN_WATCHREPO=true
DIUN_SORTALGO=semver DIUN_SORTALGO=semver
DIUN_INCLUDE= DIUN_INCLUDE=
DIUN_EXCLUDE= DIUN_EXCLUDE=
# Grafana
GRAFANA_FLAVOR=grafana-oss
GRAFANA_VERSION=9.4.3
GRAFANA_PLUGINS=
GRAFANA_DATA=./data/grafana