32e559a833
I've learned this from the Jitsi config that you don't have to add a variable if the key name is the same in the compose file as it is in the .env file
106 lines
2.3 KiB
YAML
106 lines
2.3 KiB
YAML
version: "3.5"
|
|
|
|
services:
|
|
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
|
|
- "MYSQL_ALLOW_EMPTY_PASSWORD=yes"
|
|
- MYSQL_DATABASE
|
|
- MYSQL_USER
|
|
- MYSQL_PASSWORD
|
|
restart: always
|
|
|
|
memcached:
|
|
image: memcached:alpine
|
|
container_name: librenms_memcached
|
|
restart: always
|
|
|
|
rrdcached:
|
|
image: crazymax/rrdcached
|
|
container_name: librenms_rrdcached
|
|
volumes:
|
|
- "./librenms/rrd:/data/db"
|
|
- "./rrd-journal:/data/journal"
|
|
environment:
|
|
- LOG_LEVEL=LOG_INFO
|
|
- WRITE_TIMEOUT=1800
|
|
- WRITE_JITTER=1800
|
|
- WRITE_THREADS=4
|
|
- FLUSH_DEAD_DATA_INTERVAL=3600
|
|
restart: always
|
|
|
|
librenms:
|
|
image: librenms/librenms:latest
|
|
container_name: librenms
|
|
domainname: example.com
|
|
hostname: librenms
|
|
ports:
|
|
- "80:8000"
|
|
depends_on:
|
|
- db
|
|
- memcached
|
|
- rrdcached
|
|
volumes:
|
|
- "./librenms:/data"
|
|
environment:
|
|
- DB_HOST=db
|
|
- "DB_NAME=${MYSQL_DATABASE}"
|
|
- "DB_USER=${MYSQL_USER}"
|
|
- "DB_PASSWORD=${MYSQL_PASSWORD}"
|
|
- DB_TIMEOUT=60
|
|
restart: always
|
|
|
|
cron:
|
|
image: librenms/librenms:latest
|
|
container_name: librenms_cron
|
|
domainname: example.com
|
|
hostname: librenms
|
|
depends_on:
|
|
- librenms
|
|
volumes:
|
|
- "./librenms:/data"
|
|
environment:
|
|
- DB_HOST=db
|
|
- "DB_NAME=${MYSQL_DATABASE}"
|
|
- "DB_USER=${MYSQL_USER}"
|
|
- "DB_PASSWORD=${MYSQL_PASSWORD}"
|
|
- DB_TIMEOUT=60
|
|
- SIDECAR_CRON=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"
|
|
environment:
|
|
- DB_HOST=db
|
|
- "DB_NAME=${MYSQL_DATABASE}"
|
|
- "DB_USER=${MYSQL_USER}"
|
|
- "DB_PASSWORD=${MYSQL_PASSWORD}"
|
|
- DB_TIMEOUT=60
|
|
- SIDECAR_SYSLOGNG=1
|
|
restart: always
|