1
0
Fork 0
mirror of https://github.com/librenms/docker.git synced 2026-01-23 10:15:22 +00:00
librenms-docker/examples/compose/docker-compose.yml
CrazyMax 486e371fd4
Ability to add custom nagios plugins through /data/nagios-plugins
Install official nagios-plugins package
Services enabled by default
2018-09-29 03:38:09 +02:00

136 lines
3.1 KiB
YAML

version: "3.2"
services:
traefik:
image: traefik:1.6-alpine
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.email=webmaster@example.com"
- "--acme.storage=acme.json"
- "--acme.entryPoint=https"
- "--acme.onhostrule=true"
- "--acme.httpchallenge=true"
- "--acme.httpchallenge.entrypoint=http"
ports:
- target: 80
published: 80
protocol: tcp
mode: host
- target: 443
published: 443
protocol: tcp
mode: host
volumes:
- "./acme.json:/acme.json"
- "/var/run/docker.sock:/var/run/docker.sock"
restart: always
db:
image: mariadb:10.2
command:
- "mysqld"
- "--sql-mode="
- "--innodb-file-per-table=1"
- "--lower-case-table-names=0"
volumes:
- "./db:/var/lib/mysql"
environment:
- "TZ=Europe/Paris"
- "MYSQL_ALLOW_EMPTY_PASSWORD=yes"
- "MYSQL_DATABASE=librenms"
- "MYSQL_USER=librenms"
- "MYSQL_PASSWORD=asupersecretpassword"
restart: always
memcached:
image: memcached:alpine
environment:
- "TZ=Europe/Paris"
restart: always
rrdcached:
image: crazymax/rrdcached
volumes:
- "./librenms/rrd:/data/db"
- "./rrd-journal:/data/journal"
environment:
- "TZ=Europe/Paris"
- "PUID=1000"
- "PGID=1000"
- "LOG_LEVEL=LOG_INFO"
- "WRITE_TIMEOUT=1800"
- "WRITE_JITTER=1800"
- "WRITE_THREADS=4"
- "FLUSH_DEAD_DATA_INTERVAL=3600"
restart: always
smtp:
image: juanluisbaptiste/postfix
volumes:
- "/etc/localtime:/etc/localtime:ro"
environment:
- "SERVER_HOSTNAME=librenms.example.com"
- "SMTP_SERVER=smtp.example.com"
- "SMTP_USERNAME=smtp@example.com"
- "SMTP_PASSWORD="
restart: always
app:
image: crazymax/librenms:latest
domainname: example.com
hostname: librenms
depends_on:
- db
- memcached
- rrdcached
- smtp
volumes:
- "./librenms:/data"
labels:
- "traefik.enable=true"
- "traefik.backend=librenms"
- "traefik.port=80"
- "traefik.frontend.rule=Host:librenms.example.com"
env_file:
- "./librenms.env"
restart: always
cron:
image: crazymax/librenms:latest
command:
- "/usr/local/bin/cron"
depends_on:
- app
volumes:
- "./librenms:/data"
env_file:
- "./librenms.env"
restart: always
syslog-ng:
image: crazymax/librenms:latest
command:
- "/usr/sbin/syslog-ng"
- "-F"
depends_on:
- app
ports:
- target: 514
published: 514
protocol: tcp
- target: 514
published: 514
protocol: udp
volumes:
- "./librenms:/data"
env_file:
- "./librenms.env"
restart: always