Update README.md

Added config for Docker Compose.
pull/2/head
Matthias Pröll 2019-07-02 13:28:47 +02:00 zatwierdzone przez GitHub
rodzic 0f34f8d0b0
commit fec65653e1
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
1 zmienionych plików z 18 dodań i 1 usunięć

Wyświetl plik

@ -14,6 +14,23 @@ docker run \
weweave/docker-container-stats
```
Docker-Compose:
```
version: '3.6'
services:
stats:
image: weweave/docker-container-stats
container_name: 'stats'
ports:
- '8080:8080'
volumes:
- '/var/lib/docker/:/var/lib/docker:ro'
- '/var/run/docker.sock:/var/run/docker.sock:ro'
- '/home/docker/storage/stats/db:/opt/docker-stats/db'
```
To view your stats, open a web browser and visit http://localhost:8080 (replace localhost with your docker host's hostname or ip address).
Mounting the volumes /var/lib/docker and /var/run/docker.sock (read-only) is required so that the docker container can retrieve the statistics for the containers.
@ -27,4 +44,4 @@ We strongly recommend not making your stats available online. To password protec
![All containers' inbound network traffic](https://raw.githubusercontent.com/weweave/docker-container-stats/master/img/all-containers-net.png)
![Selected container's latest statistics](https://raw.githubusercontent.com/weweave/docker-container-stats/master/img/selected-container.png)
![Selected container's latest statistics](https://raw.githubusercontent.com/weweave/docker-container-stats/master/img/selected-container.png)