fix: add x-data to body so Alpine removes x-cloak, add Makefile for local dev
All checks were successful
Build and Deploy DevOpsDash / build-image (push) Successful in 6s
All checks were successful
Build and Deploy DevOpsDash / build-image (push) Successful in 6s
- body had x-cloak but no x-data, so Alpine never initialized it and page stayed display:none - added x-data to <body> tag — Alpine now processes the element and removes x-cloak - added Makefile: make dev (hot-reload), make install, make open, make lint/fmt
This commit is contained in:
37
Makefile
Normal file
37
Makefile
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
.PHONY: help dev install lint fmt open logs
|
||||||
|
|
||||||
|
VENV := .venv
|
||||||
|
PYTHON := $(VENV)/bin/python
|
||||||
|
UV := $(VENV)/bin/uvicorn
|
||||||
|
APP := app.main:app
|
||||||
|
PORT := $(shell grep -E '^PORT=' .env 2>/dev/null | cut -d= -f2 || echo 8001)
|
||||||
|
|
||||||
|
help:
|
||||||
|
@echo "DevOpsDash local dev"
|
||||||
|
@echo ""
|
||||||
|
@echo " make dev – start uvicorn with auto-reload (uses .env)"
|
||||||
|
@echo " make install – install/sync dependencies into .venv"
|
||||||
|
@echo " make open – open browser at localhost:PORT"
|
||||||
|
@echo " make fmt – format with black"
|
||||||
|
@echo " make lint – ruff check"
|
||||||
|
|
||||||
|
install:
|
||||||
|
python3 -m venv $(VENV)
|
||||||
|
$(VENV)/bin/pip install -q -r requirements.txt
|
||||||
|
|
||||||
|
dev:
|
||||||
|
@test -f .env || (echo "⚠ No .env found – copy .env.example first: cp .env.example .env" && exit 1)
|
||||||
|
@echo "→ Starting DevOpsDash on http://localhost:$(PORT)"
|
||||||
|
env $$(grep -v '^#' .env | xargs) \
|
||||||
|
$(UV) $(APP) \
|
||||||
|
--host 0.0.0.0 --port $(PORT) \
|
||||||
|
--reload --reload-dir app
|
||||||
|
|
||||||
|
open:
|
||||||
|
open http://localhost:$(PORT)
|
||||||
|
|
||||||
|
fmt:
|
||||||
|
$(VENV)/bin/black app/
|
||||||
|
|
||||||
|
lint:
|
||||||
|
$(VENV)/bin/ruff check app/
|
||||||
@@ -37,7 +37,7 @@
|
|||||||
.prose-dark hr { border-color:#374151; margin:.75rem 0; }
|
.prose-dark hr { border-color:#374151; margin:.75rem 0; }
|
||||||
</style>
|
</style>
|
||||||
</head>
|
</head>
|
||||||
<body class="bg-gray-950 text-gray-100 min-h-screen flex flex-col" x-cloak>
|
<body class="bg-gray-950 text-gray-100 min-h-screen flex flex-col" x-data x-cloak>
|
||||||
|
|
||||||
<!-- ════════════════ TOPBAR ════════════════ -->
|
<!-- ════════════════ TOPBAR ════════════════ -->
|
||||||
<header class="flex items-center justify-between px-5 py-2.5 border-b border-gray-800 bg-gray-900 sticky top-0 z-50">
|
<header class="flex items-center justify-between px-5 py-2.5 border-b border-gray-800 bg-gray-900 sticky top-0 z-50">
|
||||||
|
|||||||
Reference in New Issue
Block a user