-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
134 lines (134 loc) · 4.59 KB
/
docker-compose.yml
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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
version: '3.8'
networks:
prometheus:
name: prometheus
traefik:
name: traefik
volumes:
grafana:
name: grafana
prometheus:
name: prometheus
acme:
name: acme
services:
grafana:
container_name: grafana
environment:
GF_INSTALL_PLUGINS: grafana-clock-panel,natel-discrete-panel,grafana-piechart-panel
image: grafana/grafana:7.3.7
labels:
traefik.enable: "true"
traefik.http.routers.grafana.entrypoints: websecure
traefik.http.routers.grafana.rule: Host(`${DOMAIN_GRAFANA}`)
traefik.http.routers.grafana.tls: "true"
traefik.http.routers.grafana.tls.certresolver: dns
traefik.http.services.grafana.loadbalancer.server.port: '3000'
networks:
prometheus: {}
traefik: {}
restart: unless-stopped
volumes:
- grafana:/var/lib/grafana:rw
netdata:
cap_add:
- SYS_PTRACE
container_name: netdata
environment:
PGID: ${DOCKER_PGID}
hostname: ${DOMAIN_NETDATA}
image: netdata/netdata:v1.28.0-amd64
labels:
traefik.enable: "true"
traefik.http.routers.netdata.entrypoints: websecure
traefik.http.routers.netdata.middlewares: traefik-auth
traefik.http.routers.netdata.rule: Host(`${DOMAIN_NETDATA}`)
traefik.http.routers.netdata.tls: "true"
traefik.http.routers.netdata.tls.certresolver: dns
traefik.http.services.netdata.loadbalancer.server.port: '19999'
networks:
prometheus: {}
traefik: {}
restart: unless-stopped
security_opt:
- apparmor:unconfined
volumes:
- /proc:/host/proc:ro
- /sys:/host/sys:ro
- /var/run/docker.sock:/var/run/docker.sock:ro
prometheus:
command: --web.enable-lifecycle --config.file=/etc/prometheus/prometheus.yml
container_name: prometheus
image: prom/prometheus:v2.24.1
labels:
traefik.enable: "true"
traefik.http.routers.prometheus.entrypoints: websecure
traefik.http.routers.prometheus.middlewares: traefik-auth
traefik.http.routers.prometheus.rule: Host(`${DOMAIN_PROMETHEUS}`)
traefik.http.routers.prometheus.tls: "true"
traefik.http.routers.prometheus.tls.certresolver: dns
traefik.http.services.prometheus.loadbalancer.server.port: '9090'
networks:
prometheus: {}
traefik: {}
restart: unless-stopped
volumes:
- ./services/prometheus:/etc/prometheus:rw
- prometheus:/prometheus:rw
traefik:
command:
- --accessLog=true
- --api.insecure=false
- --api.dashboard=true
- --api.debug=false
- --certificatesResolvers.dns.acme.dnsChallenge.delayBeforeCheck=60
- --certificatesResolvers.dns.acme.dnsChallenge.provider=${ACME_PROVIDER}
- --certificatesResolvers.dns.acme.email=${ACME_EMAIL}
- --certificatesResolvers.dns.acme.storage=/acme/acme.json
- --entrypoints.web.address=:80
- --entrypoints.websecure.address=:443
- --entryPoints.metrics.address=:8082
- --entrypoints.synapse.address=:8448
- --entrypoints.web.http.redirections.entryPoint.to=websecure
- --entrypoints.web.http.redirections.entryPoint.scheme=https
- --entrypoints.web.http.redirections.entrypoint.permanent=true
- --log.level=WARNING
- --metrics.prometheus=true
- --metrics.prometheus.buckets=0.100000, 0.300000, 1.200000, 5.000000
- --metrics.prometheus.addEntryPointsLabels=true
- --metrics.prometheus.addServicesLabels=true
- --metrics.prometheus.entryPoint=metrics
- --providers.docker=true
- --providers.docker.endpoint=unix:///var/run/docker.sock
- --providers.docker.exposedbydefault=false
- --providers.docker.network=traefik
- --serversTransport.insecureSkipVerify=true
container_name: traefik
environment:
NAMECHEAP_API_KEY: ${NAMECHEAP_API_KEY}
NAMECHEAP_API_USER: ${NAMECHEAP_API_USER}
image: traefik:v2.3.6
labels:
traefik.enable: "true"
traefik.http.middlewares.traefik-auth.basicauth.users: ${TRAEFIK_BASICAUTH_USERS}
traefik.http.routers.traefik.entrypoints: websecure
traefik.http.routers.traefik.middlewares: traefik-auth
traefik.http.routers.traefik.rule: Host(`${DOMAIN_TRAEFIK}`)
traefik.http.routers.traefik.service: api@internal
traefik.http.routers.traefik.tls: "true"
traefik.http.routers.traefik.tls.certresolver: dns
traefik.http.services.traefik.loadbalancer.server.port: '8080'
networks:
prometheus: {}
traefik: {}
ports:
- published: 80
target: 80
- published: 443
target: 443
- published: 8448
target: 8448
restart: unless-stopped
volumes:
- acme:/acme:rw
- /var/run/docker.sock:/var/run/docker.sock:rw