From e8f843ac79e45b7a0f2009f2015c277e16823c77 Mon Sep 17 00:00:00 2001 From: moshferatu Date: Fri, 15 Nov 2024 11:31:43 -0800 Subject: [PATCH] Add instructions for running Healthcheck script to README --- README.md | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/README.md b/README.md index de956fb..f1eb922 100644 --- a/README.md +++ b/README.md @@ -11,4 +11,38 @@ The containers are responsible for hosting the tunnels associated with the follo * [Moshferatu.Dev](https://moshferatu.dev/) (this site) * [Moshington](https://moshington.com/) +## Running the Healthcheck Script + +Prior to running the script, you must set the following environment variables (example values provided): + +```shell +CHECK_INTERVAL=60 +MOSHFERATU_DEV_URL=https://moshferatu.dev +MOSHFERATU_DEV_CONTAINER=moshferatu-dev-tunnel +MOSHINGTON_URL=https://moshington.com +MOSHINGTON_CONTAINER=moshington-tunnel +``` + +The healthcheck depends on ```python-dotenv```, so you can create a ```.env``` file and place the variables in there. + +### Docker Container + +The script can be run in a Docker container of its own. + +The necessary [Dockerfile](./Dockerfile) is provided here. + +Just build and run the container like any other, while making sure to set the necessary environment variables as mentioned above. + +### Standalone Script + +Make sure you have the dependencies listed in [requirements.txt](./requirements.txt) installed in addition to Docker. + +Then, run the following command: + +```shell +python ./healthcheck.py +``` + +Again, make sure to set the necessary environment variables before running the script. + --- \ No newline at end of file