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
2018-07-07 13:38:51 +02:00

97 lines
2.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:
- MYSQL_ALLOW_EMPTY_PASSWORD=yes
- MYSQL_DATABASE=librenms
- MYSQL_USER=librenms
- MYSQL_PASSWORD=asupersecretpassword
restart: always
memcached:
image: memcached:alpine
restart: always
rrdcached:
image: crazymax/rrdcached
environment:
- TZ=Europe/Paris
- LOG_LEVEL=LOG_INFO
- WRITE_TIMEOUT=1800
- WRITE_JITTER=1800
- WRITE_THREADS=4
- FLUSH_DEAD_DATA_INTERVAL=3600
restart: always
app:
image: crazymax/librenms:latest
depends_on:
- db
- memcached
- rrdcached
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
depends_on:
- app
volumes:
- librenms:/data
command: /usr/local/bin/cron
env_file:
- ./librenms.env
restart: always
volumes:
db:
librenms: