Files
BanGUI/Makefile
Lukas c097e55222 fix: setup routing, async bcrypt, password hashing, clean command
- Add SetupGuard component: redirects to /setup if setup not complete,
  shown as spinner while loading. All routes except /setup now wrapped.
- SetupPage redirects to /login on mount when setup already done.
- Fix async blocking: offload bcrypt.hashpw and bcrypt.checkpw to
  run_in_executor so they never stall the asyncio event loop.
- Hash password with SHA-256 (SubtleCrypto) before transmission; added
  src/utils/crypto.ts with sha256Hex(). Backend stores bcrypt(sha256).
- Add Makefile with make up/down/restart/logs/clean targets.
- Add tests: _check_password async, concurrent bcrypt, expired session,
  login-without-setup, run_setup event-loop interleaving.
- Update Architekture.md and Features.md to reflect all changes.
2026-03-01 19:16:49 +01:00

43 lines
1.5 KiB
Makefile

# ──────────────────────────────────────────────────────────────
# BanGUI — Project Makefile
#
# Compatible with both Docker Compose and Podman Compose.
# Auto-detects which compose binary is available.
#
# Usage:
# make up — start the debug stack
# make down — stop the debug stack
# make clean — stop and remove all debug containers, volumes, and images
# make logs — tail logs for all debug services
# make restart — restart the debug stack
# ──────────────────────────────────────────────────────────────
COMPOSE_FILE := Docker/compose.debug.yml
# Detect available compose binary.
COMPOSE := $(shell command -v podman-compose 2>/dev/null \
|| echo "podman compose")
.PHONY: up down restart logs clean
## Start the debug stack (detached).
up:
$(COMPOSE) -f $(COMPOSE_FILE) up -d
## Stop the debug stack.
down:
$(COMPOSE) -f $(COMPOSE_FILE) down
## Restart the debug stack.
restart: down up
## Tail logs for all debug services.
logs:
$(COMPOSE) -f $(COMPOSE_FILE) logs -f
## Stop containers and remove ALL debug volumes (database, node_modules, fail2ban data).
## This returns the environment to a clean first-run state.
clean:
$(COMPOSE) -f $(COMPOSE_FILE) down -v --remove-orphans
@echo "All debug volumes removed. Run 'make up' to start fresh."