forked from librenms/docker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
178 lines (169 loc) · 4.2 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
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
version: "3.5"
services:
traefik:
image: traefik:1.7-alpine
container_name: traefik
command:
- "--logLevel=INFO"
- "--defaultentrypoints=http,https"
- "--entryPoints=Name:http Address::80 Redirect.EntryPoint:https"
- "--entryPoints=Name:https Address::443 TLS"
- "--docker"
- "--docker.exposedbydefault=false"
- "--docker.domain=example.com"
- "--acme=true"
- "--acme.acmelogging=true"
- "--acme.storage=acme.json"
- "--acme.entryPoint=https"
- "--acme.onhostrule=true"
- "--acme.httpchallenge=true"
- "--acme.httpchallenge.entrypoint=http"
ports:
- target: 80
published: 80
protocol: tcp
- target: 443
published: 443
protocol: tcp
volumes:
- "./acme.json:/acme.json"
- "/var/run/docker.sock:/var/run/docker.sock"
restart: always
db:
image: mariadb:10.2
container_name: librenms_db
command:
- "mysqld"
- "--sql-mode="
- "--innodb-file-per-table=1"
- "--lower-case-table-names=0"
- "--character-set-server=utf8"
- "--collation-server=utf8_unicode_ci"
volumes:
- "./db:/var/lib/mysql"
environment:
- "TZ=${TZ}"
- "MYSQL_ALLOW_EMPTY_PASSWORD=yes"
- "MYSQL_DATABASE=${MYSQL_DATABASE}"
- "MYSQL_USER=${MYSQL_USER}"
- "MYSQL_PASSWORD=${MYSQL_PASSWORD}"
restart: always
memcached:
image: memcached:alpine
container_name: librenms_memcached
environment:
- "TZ=${TZ}"
restart: always
redis:
image: redis:5.0-alpine
container_name: librenms_redis
environment:
- "TZ=${TZ}"
restart: always
rrdcached:
image: crazymax/rrdcached
container_name: librenms_rrdcached
volumes:
- "./librenms/rrd:/data/db"
- "./rrd-journal:/data/journal"
environment:
- "TZ=${TZ}"
- "PUID=${PUID}"
- "PGID=${PGID}"
- "LOG_LEVEL=LOG_INFO"
- "WRITE_TIMEOUT=1800"
- "WRITE_JITTER=1800"
- "WRITE_THREADS=4"
- "FLUSH_DEAD_DATA_INTERVAL=3600"
restart: always
msmtpd:
image: crazymax/msmtpd:latest
container_name: librenms_msmtpd
env_file:
- "./msmtpd.env"
restart: always
librenms:
image: librenms/librenms:latest
container_name: librenms
domainname: example.com
hostname: librenms
depends_on:
- db
- memcached
- rrdcached
- smtp
volumes:
- "./librenms:/data"
labels:
- "traefik.enable=true"
- "traefik.backend=librenms"
- "traefik.port=8000"
- "traefik.frontend.rule=Host:librenms.example.com"
env_file:
- "./librenms.env"
environment:
- "TZ=${TZ}"
- "PUID=${PUID}"
- "PGID=${PGID}"
- "DB_HOST=db"
- "DB_NAME=${MYSQL_DATABASE}"
- "DB_USER=${MYSQL_USER}"
- "DB_PASSWORD=${MYSQL_PASSWORD}"
- "DB_TIMEOUT=60"
restart: always
dispatcher:
image: librenms/librenms:latest
container_name: librenms_dispatcher
domainname: example.com
hostname: librenms
depends_on:
- librenms
- redis
volumes:
- "./librenms:/data"
env_file:
- "./librenms.env"
environment:
- "TZ=${TZ}"
- "PUID=${PUID}"
- "PGID=${PGID}"
- "DB_HOST=db"
- "DB_NAME=${MYSQL_DATABASE}"
- "DB_USER=${MYSQL_USER}"
- "DB_PASSWORD=${MYSQL_PASSWORD}"
- "DB_TIMEOUT=60"
- "REDIS_HOST=redis"
- "REDIS_PORT=6379"
- "REDIS_DB=0"
- "SIDECAR_DISPATCHER=1"
restart: always
syslog-ng:
image: librenms/librenms:latest
container_name: librenms_syslog
domainname: example.com
hostname: librenms
depends_on:
- librenms
ports:
- target: 514
published: 514
protocol: tcp
- target: 514
published: 514
protocol: udp
volumes:
- "./librenms:/data"
env_file:
- "./librenms.env"
environment:
- "TZ=${TZ}"
- "PUID=${PUID}"
- "PGID=${PGID}"
- "DB_HOST=db"
- "DB_NAME=${MYSQL_DATABASE}"
- "DB_USER=${MYSQL_USER}"
- "DB_PASSWORD=${MYSQL_PASSWORD}"
- "DB_TIMEOUT=60"
- "SIDECAR_SYSLOGNG=1"
restart: always