forked from DevOps/deploy.stack
feat(base): 添加cAdvisor监控服务配置
添加cAdvisor的Docker Compose部署文件和环境变量配置 包含容器镜像版本定义、端口映射及必要的只读卷挂载
This commit is contained in:
20
base/cadvisor.stack.yaml
Normal file
20
base/cadvisor.stack.yaml
Normal file
@@ -0,0 +1,20 @@
|
||||
|
||||
## RUN:: docker compose -p base --env-file ./base/env.cfg -f ./base/cadvisor.stack.yaml up -d
|
||||
services:
|
||||
|
||||
cadvisor:
|
||||
image: ${Cadvisor_Image}
|
||||
restart: always
|
||||
container_name: cadvisor-prod
|
||||
ports:
|
||||
- 9180:8080
|
||||
volumes:
|
||||
- '/dev/disk/:/dev/disk:ro'
|
||||
- '/data/docker/:/var/lib/docker:ro'
|
||||
- '/sys:/sys:ro'
|
||||
- '/var/run:/var/run:ro'
|
||||
- '/:/rootfs:ro'
|
||||
user: '1000:1000'
|
||||
security_opt:
|
||||
- no-new-privileges
|
||||
read_only: true
|
||||
2
base/env.cfg
Normal file
2
base/env.cfg
Normal file
@@ -0,0 +1,2 @@
|
||||
Cadvisor_Tag_Ver=0.53.0-dev
|
||||
Cadvisor_Image=cleanstart/cadvisor:${Cadvisor_Tag_Ver}
|
||||
Reference in New Issue
Block a user