From 6986685424527ca1c60ea0371e7b61b3d429817b Mon Sep 17 00:00:00 2001 From: Lukas Wolfsteiner Date: Mon, 15 Feb 2021 03:39:44 +0100 Subject: [PATCH] Add docs for running using docker/docker-compose --- README.md | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/README.md b/README.md index 191fb8f..dd7f304 100644 --- a/README.md +++ b/README.md @@ -35,6 +35,28 @@ Other changes: In the configuration of the Fritzbox the option "Statusinformationen über UPnP übertragen" in the dialog "Heimnetz > Heimnetzübersicht > Netzwerkeinstellungen" has to be enabled. +### Using docker + +First you have to build the container: `docker build --tag fritzbox-prometheus-exporter:latest .` + +Then start the container: + +```bash +$ docker run -e 'USERNAME=your_fritzbox_username' \ + -e 'PASSWORD=your_fritzbox_password' \ + -e 'GATEWAY_URL="http://192.168.0.1:49000"' \ + -e 'LISTEN_ADDRESS="0.0.0.0:9042"' \ + fritzbox-prometheus-exporter:latest +``` + +### Using docker-compose + +Set your environment variables within the [docker-compose.yml](docker-compose.yml) file. + +Then start up the container using `docker-compose up -d`. + +### Using the binary + Usage: $GOPATH/bin/fritzbox_exporter -h