From eb8c86547476fa5335db0263cfc6be5fb877ad3e Mon Sep 17 00:00:00 2001 From: BlueFox Date: Mon, 16 Jun 2025 15:07:34 +0200 Subject: [PATCH] Added instructions for docker usage; added Update section --- README.md | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index ec52b84..8ce2d56 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,13 @@ Enforce a zero export (or whatever consumption you like) policy with an OpenDTU- ### Docker -Todo +To run it using docker, try the `docker-compose.yaml` file present in this repository. You will need the .env file too for that reasons, so the easiest thing is to just run the following commands: + +```bash +git clone https://git.privacynerd.de/BlueFox/SolarControl.git && cd SolarControl +vi .env # adjust the script to your needs +docker-compose up -d && docker-compose logs -f +``` ### Bare-bone @@ -22,6 +28,11 @@ python3 lge320reader.py Please note: the .env file needs to be in the same folder or any other folder higher up in the directory structure as the script (more specifically, the WORKDIR). It is just a help, actually, the script searches for specific variables in its environment variables. It only loads the .env file so that you do not need to `export` all the files before running (see https://pypi.org/project/python-dotenv/ for more details). This also means that when using it in docker, you can set the docker containers environment file to that .env file and it will be accepted too. +## Updating + +To update, simply use `git pull` to pull the latest changes. Afterwards, you need to restart your script (with docker, just use `docker-compose up -d --force-recreate`). + + ## Building docker To build the image for docker, simply use the following commands: