-
-
Save djamp42/f907423a390dee90e36354a2e159bbdf to your computer and use it in GitHub Desktop.
LibreNMS Poller Docker Service
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
TZ=America/New_York | |
PUID=1000 | |
PGID=1000 | |
MYSQL_DATABASE=librenms | |
MYSQL_USER=librenms | |
MYSQL_PASSWORD=password |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: "3.5" | |
services: | |
librenms: | |
image: librenms/librenms:latest | |
container_name: librenms | |
hostname: librenmspoller37 | |
ports: | |
- target: 8000 | |
published: 8000 | |
protocol: tcp | |
volumes: | |
- "/home/librenmsadmin/appdata:/data" | |
env_file: | |
- "./librenms.env" | |
environment: | |
- "TZ=${TZ}" | |
- "PUID=${PUID}" | |
- "PGID=${PGID}" | |
- "DB_HOST=192.168.1.35" | |
- "DB_NAME=${MYSQL_DATABASE}" | |
- "DB_USER=${MYSQL_USER}" | |
- "DB_PASSWORD=${MYSQL_PASSWORD}" | |
- "DB_TIMEOUT=60" | |
- "REDIS_HOST=192.168.1.35" | |
- "REDIS_PORT=6379" | |
- "REDIS_DB=0" | |
restart: always | |
dispatcher: | |
image: librenms/librenms:latest | |
container_name: librenms_dispatcher | |
hostname: librenmspoller37 | |
depends_on: | |
- librenms | |
volumes: | |
- "/home/librenmsadmin/appdata:/data" | |
env_file: | |
- "./librenms.env" | |
logging: | |
driver: "gelf" | |
options: | |
gelf-address: "udp://192.168.1.35:12201" | |
environment: | |
- "TZ=${TZ}" | |
- "PUID=${PUID}" | |
- "PGID=${PGID}" | |
- "DB_HOST=192.168.1.35" | |
- "DB_NAME=${MYSQL_DATABASE}" | |
- "DB_USER=${MYSQL_USER}" | |
- "DB_PASSWORD=${MYSQL_PASSWORD}" | |
- "DB_TIMEOUT=60" | |
- "DISPATCHER_NODE_ID=librenmspoller56" | |
- "SIDECAR_DISPATCHER=1" | |
- "REDIS_HOST=192.168.1.35" | |
- "REDIS_PORT=6379" | |
- "REDIS_DB=0" | |
restart: always |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
MEMORY_LIMIT=256M | |
UPLOAD_MAX_SIZE=16M | |
OPCACHE_MEM_SIZE=128 | |
REAL_IP_FROM=0.0.0.0/32 | |
REAL_IP_HEADER=X-Forwarded-For | |
LOG_IP_VAR=remote_addr | |
LIBRENMS_SNMP_COMMUNITY=librenmsdocker | |
LIBRENMS_WEATHERMAP=false | |
LIBRENMS_WEATHERMAP_SCHEDULE=*/5 * * * * |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Unit] | |
Description=LibreNMS Container Service | |
Requires=snap.docker.dockerd.service | |
After=snap.docker.dockerd.service | |
[Service] | |
Type=oneshot | |
RemainAfterExit=yes | |
WorkingDirectory=/home/librenmsadmin/librenmspoller | |
ExecStart=/snap/bin/docker-compose up -d | |
ExecStop=/snap/bin/docker-compose down | |
TimeoutStartSec=0 | |
[Install] | |
WantedBy=multi-user.target |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment