glances/docker-compose/docker-compose.yml

56 lines
1.7 KiB
YAML

services:
glances:
# See all images tags here: https://hub.docker.com/r/nicolargo/glances/tags
image: nicolargo/glances:latest-full
restart: always
pid: "host"
network_mode: "host"
read_only: true
privileged: false
# Uncomment next line for SATA or NVME smartctl monitoring
# cap_add:
# Uncomment next line for SATA smartctl monitoring
# - SYS_RAWIO
# Uncomment next line for NVME smartctl monitoring
# - SYS_ADMIN
# devices:
# - "/dev/nvme0"
volumes:
- "/:/rootfs:ro"
- "/var/run/docker.sock:/var/run/docker.sock:ro"
- "/run/user/1000/podman/podman.sock:/run/user/1000/podman/podman.sock:ro"
- "./glances.conf:/glances/conf/glances.conf"
# Uncomment for proper distro information in upper panel.
# # Works only for distros that do have this file (most of distros do).
# - "/etc/os-release:/etc/os-release:ro"
tmpfs:
- /tmp
environment:
# Please set to your local timezone (or use local ${TZ} environment variable if set on your host)
- TZ=Europe/Paris
- GLANCES_OPT=-C /glances/conf/glances.conf -w --enable-plugin smart
- PYTHONPYCACHEPREFIX=/tmp/py_caches
# # Uncomment for GPU compatibility (Nvidia) inside the container
# deploy:
# resources:
# reservations:
# devices:
# - driver: nvidia
# count: 1
# capabilities: [gpu]
# Uncomment to protect Glances WebUI by a login/password (add --password to GLANCES_OPT)
# secrets:
# - source: glances_password
# target: /root/.config/glances/<login>.pwd
# secrets:
# glances_password:
# file: ./secrets/glances_password