Dockerised and prepared with .env
This commit is contained in:
32
.env.example
Normal file
32
.env.example
Normal file
@@ -0,0 +1,32 @@
|
||||
# Thinkcentre Monitor Configuration
|
||||
# Copy this file to .env and fill in your actual values
|
||||
|
||||
# Target URL to monitor for health checks
|
||||
# This is the service URL that will be checked every CHECK_INTERVAL seconds
|
||||
TARGET_URL=http://kubernetes-service:8080
|
||||
|
||||
# Home Assistant configuration
|
||||
# HA_URL: Base URL of your Home Assistant instance
|
||||
# Example: http://homeassistant:8123 or http://192.168.1.100:8123
|
||||
HA_URL=http://homeassistant:8123
|
||||
|
||||
# HA_TOKEN: Long-lived access token from Home Assistant
|
||||
# To generate: Home Assistant Settings → Developer Tools → Long-Lived Access Tokens
|
||||
# REQUIRED - the script will exit if this is not set
|
||||
HA_TOKEN=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiI5MGUzZjBmZTYwMjc0NWU0YTAwOTdiOTk2MjY1MzU2YyIsImlhdCI6MTczMzQwMjEwMiwiZXhwIjoyMDQ4NzYyMTAyfQ.example_token_replace_with_yours
|
||||
|
||||
# HA_ENTITY: Home Assistant entity ID for the power switch
|
||||
# This is the switch entity that will be toggled to power-cycle the machine
|
||||
# Example: switch.thinkcentre_power or switch.machine_reboot_relay
|
||||
HA_ENTITY=switch.thinkcentre_power
|
||||
|
||||
# Grace period in seconds
|
||||
# When a 502 error is detected, the system waits this long for recovery
|
||||
# (useful for deployment scenarios where services may temporarily be unavailable)
|
||||
# Default: 300 (5 minutes)
|
||||
GRACE_PERIOD=300
|
||||
|
||||
# Health check interval in seconds
|
||||
# How frequently to check the target URL
|
||||
# Default: 30 seconds
|
||||
CHECK_INTERVAL=30
|
||||
Reference in New Issue
Block a user