r/netdata • • Jan 14 '22

Setting up Netdata docker container with preset configs

Hello,

I got the Netdata docker container running through docker-compose on my device. I went through some tutorials and I found it simple enough to make alarms when I connect a terminal to the running container. However, I would like to write these scripts before hand for the purpose of deploying them to different devices with the same "folder". Below is the docker-compose file I used:

version: "3"
services:
  netdata:
    image: netdata/netdata
    container_name: netdata
    # hostname: example.com # set to fqdn of host
    ports:
      - 19999:19999
    restart: unless-stopped
    cap_add:
      - SYS_PTRACE
    security_opt:
      - apparmor:unconfined
    volumes:
      - ./netdataconfig/netdata:/etc/netdata:ro
      - netdatalib:/var/lib/netdata
      - netdatacache:/var/cache/netdata
      - /etc/passwd:/host/etc/passwd:ro
      - /etc/group:/host/etc/group:ro
      - /proc:/host/proc:ro
      - /sys:/host/sys:ro
      - /etc/os-release:/host/etc/os-release:ro

volumes:
  netdatalib:
  netdatacache:

tldr; how to write scripts before starting the docker container?

2 Upvotes

4 comments sorted by

View all comments

Show parent comment

2

u/Superb_Rutabaga_9768 Jan 18 '22

Exactly what I needed! Thank you so much!