feat(Prometheus): Add new service
This commit is contained in:
parent
3d61fa584d
commit
e376de5443
|
@ -0,0 +1,21 @@
|
||||||
|
########
|
||||||
|
# DOCKER
|
||||||
|
|
||||||
|
#DOCKER_CONTEXT=
|
||||||
|
#DOCKER_HOST=
|
||||||
|
SERVICES_DIR=..
|
||||||
|
COMPOSE_FILE=${SERVICES_DIR}/prometheus/docker-compose.yml:${SERVICES_DIR}/prometheus/docker-compose.traefik.yml
|
||||||
|
#COMPOSE_PROJECT_NAME=
|
||||||
|
|
||||||
|
############
|
||||||
|
# PROMETHEUS
|
||||||
|
|
||||||
|
#PROMETHEUS_IMAGE=
|
||||||
|
PROMETHEUS_DOMAIN=prometheus.cool.life
|
||||||
|
|
||||||
|
#########
|
||||||
|
# TRAEFIK
|
||||||
|
|
||||||
|
#TRAEFIK_NETWORK_NAME=
|
||||||
|
#TRAEFIK_ROUTER_NAME=
|
||||||
|
#TRAEFIK_ENTRYPOINTS=
|
|
@ -0,0 +1,3 @@
|
||||||
|
ARG PROMETHEUS_IMAGE
|
||||||
|
FROM $PROMETHEUS_IMAGE
|
||||||
|
ADD prometheus.yml /etc/prometheus/
|
|
@ -0,0 +1,16 @@
|
||||||
|
# Prometheus
|
||||||
|
|
||||||
|
> Prometheus est un logiciel libre de surveillance informatique et générateur d'alertes. Il enregistre des métriques en temps réel dans une base de données de séries temporelles (avec une capacité d'acquisition élevée) en se basant sur le contenu de point d'entrée exposé à l'aide du protocole HTTP.
|
||||||
|
>
|
||||||
|
> -- <cite>[Wikipédia](https://fr.wikipedia.org/wiki/Prometheus_(logiciel))</cite>
|
||||||
|
|
||||||
|
## 🔧 Configuration
|
||||||
|
|
||||||
|
Pour configurer le service il faut ajouter un fichier prometheus.yml décrivant votre configuration. Vous retrouverz toutes les informations sur la page de [documentation officiel](https://prometheus.io/docs/prometheus/latest/configuration/configuration/).
|
||||||
|
|
||||||
|
## 🔗 Liens
|
||||||
|
|
||||||
|
- [Site officiel](https://prometheus.io/)
|
||||||
|
- [La documentation](https://prometheus.io/docs/)
|
||||||
|
- [Github](https://github.com/prometheus/prometheus)
|
||||||
|
- [L'image Docker sur Docker Hub](https://hub.docker.com/r/prom/prometheus)
|
|
@ -0,0 +1,15 @@
|
||||||
|
---
|
||||||
|
|
||||||
|
version: "3.8"
|
||||||
|
|
||||||
|
networks:
|
||||||
|
default:
|
||||||
|
name: ${TRAEFIK_NETWORK_NAME:-traefik}
|
||||||
|
|
||||||
|
services:
|
||||||
|
prometheus:
|
||||||
|
labels:
|
||||||
|
- traefik.enable=true
|
||||||
|
- traefik.docker.network=${TRAEFIK_NETWORK_NAME:-traefik}
|
||||||
|
- traefik.http.routers.${TRAEFIK_ROUTER_NAME:-prometheus}.rule=Host(`${PROMETHEUS_DOMAIN:?err}`)
|
||||||
|
- traefik.http.routers.${TRAEFIK_ROUTER_NAME:-prometheus}.entrypoints=${TRAEFIK_ENTRYPOINTS:-web}
|
|
@ -0,0 +1,18 @@
|
||||||
|
---
|
||||||
|
|
||||||
|
version: '3.8'
|
||||||
|
|
||||||
|
volumes:
|
||||||
|
prometheus:
|
||||||
|
name: ${PROMETHEUS_VOLUME_NAME:-prometheus}
|
||||||
|
|
||||||
|
services:
|
||||||
|
prometheus:
|
||||||
|
container_name: ${PROMETHEUS_CONTAINER_NAME:-prometheus}
|
||||||
|
build:
|
||||||
|
context: .
|
||||||
|
args:
|
||||||
|
PROMETHEUS_IMAGE: ${PROMETHEUS_IMAGE:-prom/prometheus:v2.32.1}
|
||||||
|
volumes:
|
||||||
|
- prometheus:/prometheus
|
||||||
|
restart: always
|
Loading…
Reference in New Issue