Commit Graph
1019 Commits
Author SHA1 Message Date
github-actions[bot] a75e4d6637 ci(demo-service): bump image to git-570442b 2026-07-13 01:12:57 +00:00
Junv (via Hermes) 570442bb0d fix: quote X-Forwarded-For header_up to avoid Caddy v2 replace mode dropping headers
- Both /api/* and catch-all handlers now use quoted Caddy placeholder
  syntax (e.g. "{http.request.header.X-Forwarded-For}") so Caddy evaluates
  them in 'set' mode instead of failing silently in 'replace' mode.
- demo-service-caddy.yaml ConfigMap: also added missing X-Forwarded-For
  header_up in the catch-all handler (was entirely absent).
2026-07-13 11:12:20 +10:00
github-actions[bot] 197a1b330d ci(demo-service): bump image to git-afbf6e2 2026-07-13 01:07:07 +00:00
Junv (via Hermes) afbf6e2931 fix(caddy): remove broken header_up X-Forwarded-For from catch-all handler - nginx already sets it 2026-07-13 11:06:36 +10:00
github-actions[bot] d463dfb2cc ci(demo-service): bump image to git-fb1b29e 2026-07-13 01:02:06 +00:00
Junv (via Hermes) fb1b29e066 fix(caddy): handle_path / instead of handle / to stop intercepting all routes 2026-07-13 11:01:27 +10:00
github-actions[bot] 4ce3a2449d ci(demo-service): bump image to git-7a8a7a6 2026-07-13 00:57:45 +00:00
Junv (via Hermes) 7a8a7a6a5e fix(demo-service): correct is_internal_ip() logic bug + add login link to fallback error page 2026-07-13 10:57:14 +10:00
github-actions[bot] ba724fb71f ci(demo-service): bump image to git-cf631b2 2026-07-13 00:43:47 +00:00
Junv (via Hermes) cf631b2b3e demo-service: fix internal IP detection — preserve X-Forwarded-For chain
- Caddy was overwriting X-Forwarded-For with {remote_host} (nginx
  ingress pod IP), losing the original client IP from nginx ingress
- Fix: preserve upstream X-Forwarded-For and append Caddy's remote
- Add X-Real-IP fallback in is_internal_ip() for extra safety
- Clean up the caddy-config ConfigMap accordingly
2026-07-13 10:43:19 +10:00
github-actions[bot] 4e5ca899d3 ci(demo-service): bump image to git-dd7528e 2026-07-13 00:38:21 +00:00
Junv (via Hermes) dd7528e437 demo-service: add Cache-Control no-store to HTML content responses
Prevents browser from caching old responses that had wrong
Content-Disposition header before the .draft/.bak fix.
2026-07-13 10:37:43 +10:00
github-actions[bot] f2d7c53778 ci(demo-service): bump image to git-da9b71e 2026-07-13 00:28:28 +00:00
Junv (via Hermes) da9b71ea45 demo-service: fix DB migration — add visibility column to existing tables
ALTER TABLE ADD COLUMN fails silently if column already exists
(rather than crashing on startup).
2026-07-13 10:27:52 +10:00
github-actions[bot] b2c08c6541 ci(demo-service): bump image to git-2679287 2026-07-13 00:24:06 +00:00
Junv (via Hermes) 2679287543 demo-service: add three-tier visibility (disabled/internal/public)
- Replace old enabled/published fields with single visibility field:
  - disabled → 404 for everyone (admin sees in admin UI only)
  - internal → 192.168.1.x access without auth; external → 404
  - public → anyone can access
- Admin users can see all sites via admin UI regardless of visibility
- Add /api/sites/{name}/visibility endpoint to change visibility
- Keep backward-compat enable/disable/publish/unpublish endpoints
- Database auto-migration from old enabled+published to new visibility
- NFS-safe sync_visibility hides/shows index.html per mode
2026-07-13 10:23:29 +10:00
github-actions[bot] a691553d89 ci(demo-service): bump image to git-c069b1f 2026-07-13 00:11:34 +00:00
Junv (via Hermes) c069b1f5ff demo-service: fix .draft/.bak HTML files downloaded instead of rendered
The site_content endpoint only checked for .html suffix to render
inline. Hidden HTML fallbacks (.index.html.draft, .index.html.bak)
have .draft or .bak suffixes, so they fell through to FileResponse
which triggered browser download instead of rendering.

Fix: also check for .draft and .bak suffixes.
2026-07-13 10:10:57 +10:00
github-actions[bot] 76f9e33a4c ci(demo-service): bump image to git-ad1904c 2026-07-13 00:06:59 +00:00
Junv (via Hermes) ad1904c441 demo-service: add login link to error page, mount ConfigMap into API container
- Add subtle 'Log in' link to 401/403/404 error page
- Link redirects through pass.junv.cc OAuth with return URL
- Mount error-page-html ConfigMap into API container too (so both
  Caddy and API serve the same updated error page)
- Define error-page-html ConfigMap in repo for ArgoCD management
2026-07-13 10:06:18 +10:00
Junv (via Hermes) 6afccdb765 fix: add DISCORD_ALLOW_BOTS=all to curio-agent so it can see 小黑's messages 2026-07-11 16:56:16 +10:00
Junv (via Hermes) db6587585e feat: add curio-agent manifest (privacy-protected Discord recommendation bot)
- Hermes Agent instance running as Discord bot WhatToDo#3542
- Restricted tools: only web/search, no terminal/file/system access
- DISCORD_ALLOW_ALL_USERS=true + require_mention for access control
- NetworkPolicy restricts egress to internet only (no internal network)
- Secret removed from manifest — managed via kubectl create secret
2026-07-11 16:26:36 +10:00
junv 97d3d9de21 Update n8n 2026-07-04 11:38:13 +10:00
junv 06a78b24c4 Update argocd via terraform 2026-07-04 11:34:02 +10:00
github-actions[bot] 6578d32b62 ci(demo-service): bump image to git-42e35d0 2026-06-17 00:11:23 +00:00
42e35d0ac7 fix(demo): 首页路由修复 + admin 浅色 UI 改造 (#4)
- Caddyfile: 添加 handle / 避免首页走 /site-content 重写导致 JSON 404
- service.py: / 路由区分登录态 — 已登录 302 → /admin,未登录显示 404 动画页
- admin-ui.html: 深色→浅色主题,圆角卡片、优化按钮样式、better scrollbar、hover 效果
- 同步源码 Caddyfile 与 ConfigMap

Co-authored-by: Junv (via Hermes) <junv@junnv.cc>
2026-06-17 10:10:45 +10:00
github-actions[bot] 9109f85259 ci(demo-service): bump image to git-950fa76 2026-06-14 02:44:27 +00:00
Junv (via Hermes) 950fa76eea feat(demo-service): migrate metadata to SQLite
- New _db.py module with sqlite3-based persistence
- Auto-migrate from sites.json on first run
- All writes now use _db.insert/update/delete directly
- Sites default to draft (published: false) on creation

The sites.json file is kept as .json.migrated for safety
2026-06-14 12:43:50 +10:00
Junv (via Hermes) 492ed0c3e5 fix(demo-service): move Caddyfile to dedicated ConfigMap manifest
- Extract Caddyfile from demo-service.yaml into demo-service-caddy.yaml
- ArgoCD auto-applies both files; Caddyfile changes are tracked in git
- Fixes issue where Caddyfile updates in the source dir weren't reaching the pod
2026-06-14 12:25:48 +10:00
github-actions[bot] c161f29423 ci(demo-service): bump image to git-c72f12a 2026-06-14 02:17:49 +00:00
Junv (via Hermes) c72f12ad8e ci: trigger workflow to bump PLACEHOLDER image 2026-06-14 12:17:22 +10:00
Junv (via Hermes) 89ccee86bd fix(demo-service): move imagePullSecrets to pod-level
K8s ignores imagePullSecrets at container-level; it must be at pod spec level.
This is why the pull was failing with 401.
2026-06-14 12:13:37 +10:00
github-actions[bot] 15248b4ca2 ci(demo-service): bump image to git-cbb50ac 2026-06-14 02:11:06 +00:00
Junv (via Hermes) cbb50ac941 ci(demo-service): move manifest to home-apps/ root for ArgoCD
- ArgoCD 'home-apps' app tracks the home-apps/ directory at root level only
- Move k8s-manifest.yaml to home-apps/demo-service.yaml (sibling of other apps)
- Keep source code (Dockerfile, service.py, etc.) in home-apps/demo-service/ subdirectory
- Update workflow to update the new path
- Also fix imagePullSecrets placement (pod-level not container-level)
2026-06-14 12:10:22 +10:00
github-actions[bot] b12bc67b17 ci(demo-service): bump image to git-49703c4 2026-06-14 02:02:47 +00:00
Junv (via Hermes) 49703c4c8f ci(demo-service): fix sed regex to match both old and new image references 2026-06-14 12:02:10 +10:00
Junv (via Hermes) 425955b921 ci(demo-service): GitHub Actions workflow for ghcr.io build
- .github/workflows/build-demo-service.yml builds on push when home-apps/demo-service/**
- Pushes to ghcr.io/wahyd4/demo-manager with git SHA tag + :latest
- Updates k8s-manifest.yaml with new image tag
- ArgoCD picks up the new image on next sync

k8s-manifest changes:
- image: ghcr.io/wahyd4/demo-manager (was docker.io/library/demo-manager)
- imagePullPolicy: Always
- imagePullSecrets: github-image-pull-secret (auth for ghcr.io)
2026-06-14 11:59:52 +10:00
Junv (via Hermes) 031f39bae6 fix(demo-service): force inline Content-Disposition to prevent download
- All responses (HTML, CSS, JS, images) now have Content-Disposition: inline
- Add Cache-Control: no-store to bust any cached attachment response
- 401/404 error pages: inline, text/html, no-store
2026-06-14 11:49:52 +10:00
Junv (via Hermes) cc0fe77749 fix(demo-service): render HTML inline instead of download
- FileResponse sets Content-Disposition: attachment by default
- Switch to HTMLResponse for .html files to render in browser
2026-06-14 11:45:34 +10:00
Junv (via Hermes) c76e3f86a8 fix(demo-service): drafts accessible when authenticated
- New /site-content endpoint serves files with visibility+auth check
- All paths proxied through API (not Caddy file_server)
- Drafts: 401 canvas page (no auth) or 200 content (with auth)
- Nonexistent: 404 canvas page
- Preserves proper HTTP status codes
2026-06-14 11:43:33 +10:00
Junv (via Hermes) a8a09c6675 fix(demo-service): restore admin UI, add canvas error page for 401/403/404
- admin-ui.html extracted from git history
- Caddy handle_errors serves canvas page for all HTML errors
- Error page served directly by Caddy (correct status code preserved)
- Republished hermes-stats and my-awesome-demo
- Modular file structure: _config.py, _loaders.py, admin-ui.html, error-page.html
2026-06-14 11:36:04 +10:00
Junv (via Hermes) 10a055d37c feat(demo-service): canvas particle animation error page
- Chill canvas animation with floating particles + connections
- 'This page isnt available right now' friendly message
- Modular file structure: _config.py + _loaders.py for env vars and HTML
- No login method exposed on error page
2026-06-14 11:29:42 +10:00
Junv (via Hermes) 0dfb2eaa36 feat(demo-service): minimal SVG-animated access-restricted page
- Replaces login page with pure SVG animation (no login buttons)
- Animated lock icon, pulsing dots, orbiting ring, breathing circles
- Lightweight — zero dependencies, pure CSS/SVG
2026-06-14 11:22:09 +10:00
Junv (via Hermes) ad75449e0d feat(demo-service): beautiful login-required page for /admin
- Replaces 401 JSON with styled HTML error page
- Glassmorphism card with Pocket ID SSO sign-in button
- New sites default to draft (published: false)
2026-06-14 11:20:30 +10:00
Junv (via Hermes) b694a317d4 fix(demo-service): site title opens new tab unless disabled 2026-06-14 11:15:29 +10:00
Junv (via Hermes) 7edfe2cfa4 fix(demo-service): always render site name as clickable link
- Published sites: link to public URL
- Draft sites: link with dashed underline → opens preview modal
2026-06-14 11:11:36 +10:00
Junv (via Hermes) 4dce2be3d4 feat(demo-service): add publish/unpublish draft system with preview
- Sites now start as drafts (published: false) — hidden from public
- Publish endpoint makes site live at demo.junv.cc/<name>
- Unpublish hides it back to draft
- Preview endpoint serves draft HTML to authenticated users
- Caddy blocks .draft/.bak files (defense-in-depth)
- Backward compatible: existing sites default to published
- sync_visibility() handles all state transitions
2026-06-14 11:10:25 +10:00
Junv (via Hermes) 3e36501eba fix: Caddy routing for /admin without trailing slash 2026-06-14 10:59:14 +10:00
Junv (via Hermes) d4484e6750 feat: add Demo Service — Caddy + FastAPI for hosting demo sites at demo.junv.cc
- Caddy as static file server + reverse proxy
- FastAPI management API with Pocket ID SSO
- Web UI at demo.junv.cc/admin
- Agent API with Bearer token auth
- Demo sites accessible at demo.junv.cc/<folder-name>
- NFS PVC for persistent storage
- Enable/disable per-site
2026-06-14 10:57:36 +10:00
Junv (via Hermes) 3a860bb486 remove: K8s security-audit cronjob (path not available on node, switching to Hermes cron) 2026-06-13 15:26:14 +10:00