refactor(core): restore homepage dashboard and automate core service discovery
Core Architecture & Invariant CI / validate (push) Successful in 9m43s
Core Architecture & Invariant CI / validate (push) Successful in 9m43s
- Reintegrate the homepage service into the root docker-compose.yml stack - Restore baseline homepage configuration files to config/homepage/ - Update appctl engine to auto-inject core infrastructure services into the dashboard - Implement custom local icon resolution and volume mounting for appctl sync - Redirect appctl to sync dynamically generated services.yaml to the core config - Add config/homepage/services.yaml to .gitignore to prevent tracking generated state - Register homepage in appctl core services list and structural invariant tests
This commit is contained in:
1 parent
8134070398
commit
118da3dd84
4 files changed
+52
-2
No files matched your search
@@ -1 +0,0 @@
|
|||||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 412 449" fill="#0d0d0d"><path d="M54.4 370a373 373 0 0036.6 16.5c42.9 16.5 81 27 127 32.7 39 4.9 98 6.1 134-9.7l.2-28.7 10.9-4.2.1 7.6c.1 9.5 10.2 10 10.1 16.6l-.2 19.5a10.9 10.9 0 01-5.3 8.8 126 126 0 01-34.7 13.1c-27.4 5.9-54.8 7.6-83 6.1a502 502 0 01-114.8-19.3C98.3 418.3 63.3 404.2 30.4 384.4c-1.8-1.1-4.6-4.1-4.6-5.8l.5-25.2 11-8.4c1.5-34.5-.5-23-14.7-49.9C-4.9 243.1-6.6 188.6 13.7 132.1c9.6 20.2 21.2 38.3 37.4 52.9C37.7 162.7 27.2 140 22.1 114.6 58.6 40.2 137.3-5.7 220.2.6c51 3.8 94.2 25.6 130.4 62-12-3.2-22.2-5.6-33.7-6.8-41.1-31.1-89.5-44.9-140.7-36.2-20.9 3.5-34 7-50.7 16.9l14.1-2.5 15.9-2.8c8.5-1.5 24.6-1 33.8-.2 22.7 2.1 53.6 13.7 71.7 29-12.6 3.8-24.8 7-37.2 12.5-54.8 24.4-99.9 64.9-131 115.9-7.9-2.9-15.5-4.4-23.5-2.5 29.8 6 39 41.1 31.8 68-2.4 9-7.4 16.2-14.7 22.4a346.5 346.5 0 00147.3 97.2l12 21.2c1.8 3.3.4 10.1.3 14.5-54.7-3.5-108.5-14.2-157.9-37.6l-33.3-15.8a55.5 55.5 0 00-.3 14.3m15.8-103.6c8.8-2.1 12.7-9.2 15.7-16.5 4-13 2.4-27.4-5.3-38.7-5.4-7.8-14.8-12.2-23.8-9.3a20.8 20.8 0 00-13.4 12.7c8.4-7.9 19.2-8.3 27.1-.2 12.6 13.1 13.3 38-.3 52M56.2 335.7c19.3 9.7 37.1 17.6 57.6 25.6l.5-41c0-5.6-7.1-8.2-10.9-7.4-13.3 2.7-5.9 17.1-8 29.2l-39.8-19.4c-1 4.6-1.3 9.4.6 13m139.6 48.3c1.1-4.4 1.2-8.7-.8-11.5a513 513 0 01-66-18 16.3 16.3 0 00-.1 12.2c8.3 2.7 16.2 5.3 24.7 7.3z"/><path d="M326 373.5c-78.7 7.3-171.3-41.7-224.8-98.7 21-21.4 19.6-56.4 1.4-79.5 14.1-22 29.7-42 48.5-59.7C194 95.2 252.8 65.2 312.9 67.5c31.5 1.8 71.1 11.3 70.5 49.8a215.2 215.2 0 017.4 201.1c3.6 38.3-33.5 51.8-64.9 55.1m-156.6-69.6c44.6 29.3 106.3 54.1 159.9 46.5 8.5-1.2 16.5-3.9 24.6-6.3 5-1.5 7.1-5.2 9.6-9 48.2-74.2 42.9-170.7-13.8-238.4C301.1 78.6 245.2 94.2 203 121.5c-17 11-32.9 23.2-46.2 38.5-14.8 17-20.8 39.2-21.9 61.4-1.2 23.5 5.3 45.1 17.5 64.8a53.6 53.6 0 0017 17.8"/><path d="M298.5 409.1c-4.5.4-7.9-1.7-9.4-5.2a12.3 12.3 0 011.1-11c1.5-2.5 5.4-4.9 8.9-5.2l31.9-2.5a8.6 8.6 0 019.3 6.1c.9 3.4.5 9.3-3.5 10.6-12.4 4.1-24.7 6-38.3 7.2"/><rect width="15.3" height="16.2" x="258.6" y="409.9" rx="0" transform="rotate(-89.7 266.3 418)"/><path d="M370.4 283.3c-6.1 17.6-13.5 33.4-26.4 47.2 26-57.7 30.3-124.2 4.1-182.3-6.7-14.8-15-27.3-24.8-41 5.1.8 13 .9 17 4.2 7.8 6.5 12.5 15.5 17.4 24.5 24.5 45.2 29.8 98.2 12.7 147.5"/></svg>
|
|
||||||
|
Before Width: | Height: | Size: 2.2 KiB |
File renamed without changes.
|
Before Width: | Height: | Size: 2.2 KiB After Width: | Height: | Size: 2.2 KiB |
@@ -212,6 +212,7 @@ services:
|
|||||||
restart: always
|
restart: always
|
||||||
volumes:
|
volumes:
|
||||||
- ./config/homepage:/app/config
|
- ./config/homepage:/app/config
|
||||||
|
- ./config/homepage/icons:/app/public/icons:ro
|
||||||
environment:
|
environment:
|
||||||
- HOMEPAGE_ALLOWED_HOSTS=${HOMEPAGE_DOMAIN:-dashboard.${DOMAIN}}
|
- HOMEPAGE_ALLOWED_HOSTS=${HOMEPAGE_DOMAIN:-dashboard.${DOMAIN}}
|
||||||
networks:
|
networks:
|
||||||
|
|||||||
@@ -734,6 +734,32 @@ def cmd_sync_homepage(args):
|
|||||||
|
|
||||||
# Group by homepage group
|
# Group by homepage group
|
||||||
groups = {}
|
groups = {}
|
||||||
|
|
||||||
|
# 1. Add Core Infrastructure services
|
||||||
|
core_group = "Core Infrastructure"
|
||||||
|
groups[core_group] = []
|
||||||
|
core_metadata = {
|
||||||
|
"traefik": {"title": "Traefik", "icon": "traefik.png", "weight": 10},
|
||||||
|
"authelia": {"title": "Authelia", "icon": "authelia.png", "weight": 20},
|
||||||
|
"portainer": {"title": "Portainer", "icon": "portainer.png", "weight": 30},
|
||||||
|
"dozzle": {"title": "Dozzle", "icon": "dozzle.png", "weight": 40},
|
||||||
|
}
|
||||||
|
for svc in get_core_services():
|
||||||
|
name = svc["name"]
|
||||||
|
if name in core_metadata and svc["domain"] != "internal":
|
||||||
|
meta = core_metadata[name]
|
||||||
|
groups[core_group].append({
|
||||||
|
"title": meta["title"],
|
||||||
|
"icon": meta["icon"],
|
||||||
|
"href": f"https://{svc['domain']}",
|
||||||
|
"description": svc["desc"],
|
||||||
|
"server": "my-docker",
|
||||||
|
"container": svc["container"],
|
||||||
|
"weight": meta["weight"],
|
||||||
|
})
|
||||||
|
|
||||||
|
# 2. Add Site applications
|
||||||
|
icons_dir = os.path.join(homepage_dir, "icons")
|
||||||
for app in visible_apps:
|
for app in visible_apps:
|
||||||
hp = app.get("homepage", {})
|
hp = app.get("homepage", {})
|
||||||
group_name = hp.get("group", "Applications")
|
group_name = hp.get("group", "Applications")
|
||||||
@@ -746,6 +772,24 @@ def cmd_sync_homepage(args):
|
|||||||
weight = hp.get("weight", 50)
|
weight = hp.get("weight", 50)
|
||||||
desc = app.get("description", "")
|
desc = app.get("description", "")
|
||||||
|
|
||||||
|
# Resolve custom local icons mounted in config/homepage/icons
|
||||||
|
if (
|
||||||
|
os.path.isdir(icons_dir)
|
||||||
|
and not icon.startswith(("/", "http"))
|
||||||
|
and (
|
||||||
|
os.path.isfile(os.path.join(icons_dir, icon))
|
||||||
|
or os.path.isfile(os.path.join(icons_dir, f"{icon}.svg"))
|
||||||
|
or os.path.isfile(os.path.join(icons_dir, f"{icon}.png"))
|
||||||
|
)
|
||||||
|
):
|
||||||
|
if not icon.endswith((".svg", ".png", ".webp")):
|
||||||
|
if os.path.isfile(os.path.join(icons_dir, f"{icon}.svg")):
|
||||||
|
icon = f"/icons/{icon}.svg"
|
||||||
|
else:
|
||||||
|
icon = f"/icons/{icon}.png"
|
||||||
|
else:
|
||||||
|
icon = f"/icons/{icon}"
|
||||||
|
|
||||||
card_data = {
|
card_data = {
|
||||||
"title": card_title,
|
"title": card_title,
|
||||||
"icon": icon,
|
"icon": icon,
|
||||||
@@ -758,7 +802,13 @@ def cmd_sync_homepage(args):
|
|||||||
groups[group_name].append(card_data)
|
groups[group_name].append(card_data)
|
||||||
|
|
||||||
# Preferred group order
|
# Preferred group order
|
||||||
preferred_order = ["Knowledge & Notes", "Media & Productivity", "Development & AI", "Applications"]
|
preferred_order = [
|
||||||
|
"Core Infrastructure",
|
||||||
|
"Knowledge & Notes",
|
||||||
|
"Media & Productivity",
|
||||||
|
"Development & AI",
|
||||||
|
"Applications",
|
||||||
|
]
|
||||||
sorted_groups = []
|
sorted_groups = []
|
||||||
for g in preferred_order:
|
for g in preferred_order:
|
||||||
if g in groups:
|
if g in groups:
|
||||||
|
|||||||
Reference in new issue
Block a user