mydocker/brana-frontend
blasebast 9b069a15c4 docs: improve all README files, add uptime-kuma 2026-04-12 20:11:50 +02:00
..
Dockerfile .gitignore, documentation, other improvements 2026-04-04 21:45:48 +02:00
README.md docs: improve all README files, add uptime-kuma 2026-04-12 20:11:50 +02:00
index.html .gitignore, documentation, other improvements 2026-04-04 21:45:48 +02:00
nginx.conf .gitignore, documentation, other improvements 2026-04-04 21:45:48 +02:00

README.md

Brana Frontend - Gate Control Panel

Static HTML page served by nginx, communicating directly with Home Assistant via REST API. Mobile-first design (max-width 420px, dark mode).

Access

Endpoint Details
Public URL https://brana.sebson.space
Internal Port 9080 -> 80

Features

  • Displays current gate state (open/closed/unknown) from Home Assistant
  • Action buttons: open, close, stop
  • Calls HA services via https://ha.sebson.space (CSP allows only this host)
  • Modal dialog for entering HA token (stored in localStorage)
  • Status indicators:
    • Ready - green
    • Processing - blue (animated)
    • Error - red

Nginx Configuration

  • Security headers: X-Frame-Options DENY, Content-Security-Policy, X-Content-Type-Options
  • Real IP from X-Real-IP header (trusts 10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16 - Traefik ranges)
  • Gzip compression for assets
  • /health - health check endpoint

Useful Commands

# Follow nginx logs
docker compose logs -f brana-frontend

# Validate nginx config
docker exec brana-frontend nginx -t

# Reload config without restart
docker exec brana-frontend nginx -s reload

# Rebuild after changes to index.html
docker compose build brana-frontend && docker compose up -d brana-frontend