Skip to content

Commit

Permalink
Add Dockerfile to run gw2pvo in a container
Browse files Browse the repository at this point in the history
  • Loading branch information
Mark Ruys committed Jul 5, 2020
1 parent bcadef8 commit 8496512
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 4 deletions.
6 changes: 6 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
FROM python:3.7

RUN pip install gw2pvo

ENTRYPOINT exec gw2pvo --config /gw2pvo.cfg

35 changes: 31 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,37 @@ sudo systemctl status gw2pvo
sudo journalctl -u gw2pvo -f
```
## Docker
You can use the [Dockerfile](https://github.com/markruys/gw2pvo/blob/master/Dockerfile) to run a Docker container as follows:
```shell
docker build --tag gw2pvo .
```
Add all settings to config file named `gw2pvo.cfg` like:
```ini
[Defaults]
gw_station_id = ...
gw_account = ...
gw_password = ...
pvo_api_key = ...
pvo_system_id = ...
city = Amsterdam
log = info
pvo_interval = 5
skip_offline = yes
```
Do set `city` to a [valid value](https://astral.readthedocs.io/en/stable/index.html#cities) otherwise the container will use the UTC timezone. Then start the container like:
```shell
docker run --rm -v $(pwd)/gw2pvo.cfg:/gw2pvo.cfg gw2pvo
```
## Recover missed data
You can copy a day of readings from GoodWe to PVOutput. Interval will be 10 minutes as this is what the API provides. Syntax:
Expand All @@ -174,10 +205,6 @@ gw2pvo --config gw2pvo.cfg --date YYYY-MM-DD
Beware that the date parameter must be not be older than 14 days from the current date. In donation mode, not more than 90 days.
## Docker
Michaël Hompus created a [Docker container](https://hub.docker.com/r/energy164/gw2pvo/) ([Github](https://github.com/eNeRGy164/gw2pvo-docker)) to run gw2pvo.
## Disclaimer and warrenty
Gw2pvo is *not* an official software from GoodWe/Sems and it is not endorsed or supported by this company. Gw2pvo has been written as a personal work. Feel free to improve or adapt it to your own needs.
Expand Down

0 comments on commit 8496512

Please sign in to comment.