-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcompose.yaml
More file actions
57 lines (54 loc) · 1.65 KB
/
Copy pathcompose.yaml
File metadata and controls
57 lines (54 loc) · 1.65 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
services:
prometheus:
image: prom/prometheus:v3.3.1
container_name: prometheus
restart: unless-stopped
user: "3001:3001"
networks:
- monitoring
- traefik
volumes:
- /mnt/SSD/Containers/prometheus/prometheus.yml:/etc/prometheus/prometheus.yml:ro
- prometheus-data:/prometheus
command:
- "--config.file=/etc/prometheus/prometheus.yml"
- "--storage.tsdb.path=/prometheus"
- "--storage.tsdb.retention.time=30d"
- "--web.enable-lifecycle"
- "--web.enable-otlp-receiver"
- "--web.enable-remote-write-receiver"
labels:
- "traefik.enable=true"
- "traefik.docker.network=traefik"
- "traefik.http.routers.prometheus.rule=Host(`${PROMETHEUS_DOMAIN}`)"
- "traefik.http.routers.prometheus.entrypoints=websecure"
- "traefik.http.routers.prometheus.tls.certresolver=letsencrypt"
- "traefik.http.routers.prometheus.middlewares=secure-headers@file,lan-only@file"
- "traefik.http.routers.prometheus.service=prometheus@docker"
- "traefik.http.services.prometheus.loadbalancer.server.port=9090"
security_opt:
- no-new-privileges:true
logging:
driver: json-file
options:
max-size: 10m
max-file: "3"
healthcheck:
test: ["CMD", "wget", "--quiet", "--tries=1", "--spider", "http://localhost:9090/-/healthy"]
interval: 30s
timeout: 10s
retries: 3
start_period: 30s
volumes:
prometheus-data:
driver: local
driver_opts:
type: none
device: /mnt/SSD/Containers/prometheus
o: bind
networks:
monitoring:
name: monitoring
driver: bridge
traefik:
external: true