Màj 06-04-2024
This commit is contained in:
65
docs/Synology/Docker/docker-compose/glances.md
Normal file
65
docs/Synology/Docker/docker-compose/glances.md
Normal file
@@ -0,0 +1,65 @@
|
||||
# glances
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
| Création | Portainer |
|
||||
| ----------- | ------------------------------------------------------------ |
|
||||
| Mise-à-jour | Watchtower |
|
||||
| Ports | 61208 |
|
||||
| Liens | [Github](https://github.com/nicolargo/glances)<br />[Docker](https://github.com/nicolargo/glances/blob/develop/docs/docker.rst) |
|
||||
|
||||
|
||||
|
||||
```yaml
|
||||
version: "3.9"
|
||||
services:
|
||||
glances:
|
||||
container_name: Glances
|
||||
image: nicolargo/glances:latest-full
|
||||
healthcheck:
|
||||
test: curl -f http://localhost:61208/ || exit 1
|
||||
mem_limit: 4g
|
||||
cpu_shares: 768
|
||||
security_opt:
|
||||
- no-new-privileges:true
|
||||
pid: host
|
||||
privileged: true
|
||||
network_mode: host
|
||||
restart: on-failure:5
|
||||
ports:
|
||||
- 61208:61208
|
||||
volumes:
|
||||
- /var/run/docker.sock:/var/run/docker.sock:ro
|
||||
environment:
|
||||
GLANCES_OPT: -w
|
||||
```
|
||||
|
||||
|
||||
|
||||
By default, the /etc/glances/glances.conf file is used (based on docker-compose/glances.conf).
|
||||
|
||||
Additionally, if you want to use your own glances.conf file, you can create your own Dockerfile:
|
||||
|
||||
```
|
||||
FROM nicolargo/glances:latest
|
||||
COPY glances.conf /root/.config/glances/glances.conf
|
||||
CMD python -m glances -C /root/.config/glances/glances.conf $GLANCES_OPT
|
||||
```
|
||||
|
||||
|
||||
|
||||
Alternatively, you can specify something along the same lines with docker run options (notice the GLANCES_OPT environment variable setting parameters for the glances startup command):
|
||||
|
||||
```
|
||||
docker run -e TZ="${TZ}" -v `pwd`/glances.conf:/root/.config/glances/glances.conf -v /var/run/docker.sock:/var/run/docker.sock:ro -v /run/user/1000/podman/podman.sock:/run/user/1000/podman/podman.sock:ro --pid host -e GLANCES_OPT="-C /root/.config/glances/glances.conf" -it nicolargo/glances:latest-full
|
||||
```
|
||||
|
||||
|
||||
|
||||
Where `pwd`/glances.conf is a local directory containing your glances.conf file.
|
||||
|
||||
glances.conf
|
||||
|
||||
https://github.com/nicolargo/glances/blob/develop/conf/glances.conf
|
||||
Reference in New Issue
Block a user