forked from DevOps/deploy.stack
feat(netdata): 添加netdata监控服务的docker部署配置
添加docker-compose配置文件、环境变量配置和netdata配置文件,用于快速部署netdata监控服务
This commit is contained in:
3
netdata/config/netdata.conf
Normal file
3
netdata/config/netdata.conf
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
# docker exec -it netdata bash
|
||||||
|
# cd /etc/netdata
|
||||||
|
# ./edit-config netdata.conf
|
||||||
2
netdata/env.cfg
Normal file
2
netdata/env.cfg
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
IMAGE_TAG=netdata/netdata:edge-0
|
||||||
|
Volumes_Path=/data/volumes/netdata
|
||||||
33
netdata/stack.yml
Normal file
33
netdata/stack.yml
Normal file
@@ -0,0 +1,33 @@
|
|||||||
|
## PULL:: docker compose --env-file ./netdata/env.cfg -f ./netdata/stack.yml pull
|
||||||
|
## RUN:: docker compose -p netdata --env-file ./netdata/env.cfg -f ./netdata/stack.yml up -d
|
||||||
|
|
||||||
|
services:
|
||||||
|
netdata:
|
||||||
|
image: ${IMAGE_TAG}
|
||||||
|
container_name: netdata_dashboard
|
||||||
|
hostname: my_docker_compose_netdata
|
||||||
|
pid: host
|
||||||
|
network_mode: host
|
||||||
|
restart: unless-stopped
|
||||||
|
cap_add:
|
||||||
|
- SYS_PTRACE
|
||||||
|
- SYS_ADMIN
|
||||||
|
security_opt:
|
||||||
|
- apparmor:unconfined
|
||||||
|
volumes:
|
||||||
|
- ${Volumes_Path}/config:/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
|
||||||
|
|
||||||
|
volumes:
|
||||||
|
netdatalib:
|
||||||
|
netdatacache:
|
||||||
Reference in New Issue
Block a user