From df536c8ef7145be76f74fc95403355f35c7c7679 Mon Sep 17 00:00:00 2001 From: Stefan Haun Date: Sat, 2 Nov 2024 17:50:21 +0100 Subject: [PATCH] Add documentation on configuration and usage --- README.md | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/README.md b/README.md index 8be9ef0..ac3f3a4 100644 --- a/README.md +++ b/README.md @@ -5,6 +5,36 @@ This could be done in NodeRed, but it is part of our critical infrastrukture and should run independently. +## Usage + +### Configuration + +Configuration is done using environment variables: + +* `PORT`: Target port when used with docker-compose (default `8080`) + +### Run with Docker + +```bash +docker run --rm -it \ + -p 8080:8080 \ + netz39/ampel-controller +``` + +### Run with Docker-Compose (Development) + +To run with [docker-compose](https://docs.docker.com/compose/) copy [`.env.template`](.env.template) to `.env` and edit the necessary variables. Then start with: + +```bash +docker-compose up --build +``` + +Please note that this compose file will rebuild the image based on the repository. This is helpful during development and not intended for production use. + +When done, please don't forget to remove the deployment with +```bash +docker-compose down +``` ## Maintainers