Using Netdata with Kamal

I thought I’d have a go at adding a Netdata accessory to my Kamal deployment. It works quite well. Here’s the config:

  netdata:
    image: netdata/netdata:latest
    role: web
    network: host
    options:
      pid: host
      cap-add:
        - SYS_PTRACE
        - SYS_ADMIN
      security-opt:
        - apparmor=unconfined
    volumes:
      - netdataconfig:/etc/netdata
      - netdatalib:/var/lib/netdata
      - netdatacache:/var/cache/netdata
      - /:/host/root:ro,rslave
      - /etc/passwd:/host/etc/passwd:ro
      - /etc/group:/host/etc/group:ro
      - /etc/localtime:/etc/localtime:ro
      - /proc:/host/proc:ro
      - /sys:/host/sys:ro
      - /etc/os-release:/host/etc/os-release:ro
      - /var/log:/host/var/log:ro
      - /var/run/docker.sock:/var/run/docker.sock:ro
      - /run/dbus:/run/dbus:ro

Obviously sanity check it for your requirements as it does reach into the host quite deeply. It’s based on their documentation:

In terms of routing, it ends up running on 127.0.0.1:19999 which you can tunnel to using something like cloudflared.

I just moved from render to clever cloud & trouble shooting.

but it’s one time error & the database costs more then render so I’m gonna connect ubicloud database to clever cloud.

I once tried on kamal when I was a beginner following the Typecraft rails new tutorial part 7 but then heard about danube data then when I moved from frontend worker to full stack worker I had pod issues frustrating me so I researched & found render now clever cloud.