Commit 7f41ca9e authored by CarlosEDP's avatar CarlosEDP
Browse files

Added Traefik and monitoring thru Prometheus

parent 1aebf1f7
*/acme.json
......@@ -5,7 +5,7 @@ volumes:
grafana_data: {}
networks:
monitoring:
default:
services:
......@@ -15,8 +15,6 @@ services:
- cadvisor
- node_exporter
restart: unless-stopped
networks:
- monitoring
ports:
- 9090:9090
volumes:
......@@ -36,8 +34,6 @@ services:
node_exporter:
image: napnap75/rpi-prometheus:node_exporter
restart: unless-stopped
networks:
- monitoring
ports:
- 9100:9100
volumes:
......@@ -55,8 +51,6 @@ services:
cadvisor:
image: carlosedp/rpi-cadvisor
restart: unless-stopped
networks:
- monitoring
ports:
- 8082:8080
volumes:
......@@ -70,8 +64,6 @@ services:
# alertmanager:
# image: napnap75/rpi-prometheus:alertmanager
# restart: unless-stopped
# networks:
# - monitoring
# ports:
# - 9093:9093
# volumes:
......@@ -89,8 +81,6 @@ services:
depends_on:
- prometheus
restart: unless-stopped
networks:
- monitoring
ports:
- 3000:3000
volumes:
......@@ -100,7 +90,7 @@ services:
labels:
- "traefik.backend=grafana"
- "traefik.frontend.rule=Host:grafana.cloud.carlosedp.com"
- "traefik.docker.network=${COMPOSE_PROJECT_NAME}_monitoring"
- "traefik.docker.network=${COMPOSE_PROJECT_NAME}_default"
- "traefik.enable=true"
- "traefik.port=3000"
- "traefik.default.protocol=http"
......
......@@ -43,3 +43,13 @@ scrape_configs:
- 'cadvisor'
type: 'A'
port: 8080
- job_name: 'traefik'
scrape_interval: 10s
#static_configs:
# - targets: ['traefik:8080']
dns_sd_configs:
- names:
- 'traefik'
type: 'A'
port: 8080
version: '2'
networks:
default:
services:
traefik:
image: traefik:v1.5.0-rc5
restart: always
ports:
- 80:80
- 443:443
- 8080:8080
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- $PWD/traefik/:/etc/traefik/
command:
- '--configFile=/etc/traefik/traefik.toml \'
# - '--logLevel=DEBUG'
portainer:
image: portainer/portainer
restart: always
ports:
- 9000
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- portainer_data:/data
labels:
- "traefik.backend=portainer"
- "traefik.frontend.rule=Host:portainer.cloud.carlosedp.com"
- "traefik.docker.network=${COMPOSE_PROJECT_NAME}_monitoring"
- "traefik.enable=true"
- "traefik.port=9000"
- "traefik.default.protocol=http"
volumes:
portainer_data: {}
defaultEntryPoints = ["http","https"]
debug = false
logLevel = "INFO"
[entryPoints]
[entryPoints.http]
address = ":80"
[entryPoints.http.redirect]
entryPoint = "https"
[entryPoints.https]
address = ":443"
[entryPoints.https.tls]
[acme]
email = "carlosedp@gmail.com"
storage = "/etc/traefik/acme.json"
entryPoint = "https"
onDemand = false
OnHostRule = true
caServer = "https://acme-v01.api.letsencrypt.org/directory"
[acme.httpChallenge]
entryPoint="http"
# Web configuration backend
[web]
address = ":8080"
[web.metrics.prometheus]
buckets=[0.1,0.3,1.2,5.0]
entryPoint = "traefik"
# Docker configuration backend
[docker]
domain = "cloud.carlosedp.com"
watch = true
exposedbydefault = false
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment