Files
glances/docker-compose/docker-compose.yml
korn3r 202289599d Update docker-compose.yml
added commented out by default mount point for /etc/os-release. without it Glances container shows distibution information from container itself and not host system.
2025-07-21 02:05:09 +03:00

37 lines
1.1 KiB
YAML

version: '3.9'
services:
glances:
build:
context: ./
dockerfile: Dockerfile
restart: always
pid: "host"
privileged: true
network_mode: "host"
volumes:
- "/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"
environment:
- TZ=${TZ}
- GLANCES_OPT=-C /glances/conf/glances.conf -w
# # 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