Add webnut compose stack, reading credentials from .env

Web UI for the NUT UPS daemon.

UPS credentials come from .env alongside the compose file, which Compose
loads automatically; see .env.example. Required values use ${VAR:?} so a
missing .env fails loudly rather than starting the container with a blank
password.

Drop the obsolete top-level version key.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
ergosteur
2026-08-06 15:45:12 +00:00
co-authored by Claude Opus 5
parent d44e4582d3
commit 7c13144c5b
2 changed files with 27 additions and 0 deletions
+20
View File
@@ -0,0 +1,20 @@
services:
webnut:
image: teknologist/webnut
container_name: webnut
# Values come from .env alongside this file (see .env.example).
environment:
- UPS_HOST=${UPS_HOST:?set UPS_HOST in .env}
- UPS_PORT=${UPS_PORT:-3493}
- UPS_USER=${UPS_USER:?set UPS_USER in .env}
- UPS_PASSWORD=${UPS_PASSWORD:?set UPS_PASSWORD in .env}
restart: unless-stopped
security_opt:
- no-new-privileges:true
networks:
- webnut-net
ports:
- 6543:6543
networks:
webnut-net:
external: true