31 lines
1.1 KiB
YAML
31 lines
1.1 KiB
YAML
# {{ ansible_managed }}
|
|
|
|
services:
|
|
prometheus:
|
|
image: prom/prometheus:{{ docker_prometheus_version }}
|
|
environment:
|
|
- TZ=Europe/Paris
|
|
volumes:
|
|
- ./prometheus:/etc/prometheus
|
|
- {{ docker_prometheus_data_dir }}/{{ docker_prometheus_service_id }}/prometheus_data:/prometheus
|
|
command:
|
|
- '--config.file=/etc/prometheus/prometheus.yml'
|
|
- '--storage.tsdb.path=/prometheus'
|
|
- '--web.console.libraries=/etc/prometheus/console_libraries'
|
|
- '--web.console.templates=/etc/prometheus/consoles'
|
|
- '--storage.tsdb.retention.time={{ docker_prometheus_retention_time }}'
|
|
- '--web.enable-lifecycle'
|
|
restart: always
|
|
networks:
|
|
- traefik
|
|
labels:
|
|
- "org.label-schema.group=monitoring"
|
|
- "traefik.enable=true"
|
|
- "traefik.docker.network=traefik"
|
|
- "traefik.http.routers.{{ docker_prometheus_service_id }}.entrypoints=web"
|
|
- "traefik.http.routers.{{ docker_prometheus_service_id }}.rule=Host(`{{ docker_prometheus_fqdn }}`)"
|
|
- "traefik.http.services.{{ docker_prometheus_service_id }}.loadbalancer.server.port=9090"
|
|
|
|
networks:
|
|
traefik:
|
|
external: true
|