Move web app up a level, live dashboard refresh, self-update

- web: move app/web/web/* to app/web/, drop the old standalone compose
  file and watcher_additions.py (merged into watcher.py)
- web: /api/version fingerprint of state, config and queued requests;
  the page polls it every 2s and reloads as soon as the watcher acts
- watcher: self-update. When its own branch has a new commit and the
  checkout is clean, start a one-off gitops-watcher-updater container
  that runs git pull + docker compose up -d --build on the host checkout
- watcher: refuse to deploy/stop/remove its own compose project, which
  used to stop the watcher itself mid-way

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
rainyy21
2026-11-11 16:17:05 -05:00
parent 999f852805
commit 5f70813202
13 changed files with 533 additions and 386 deletions
+30
View File
@@ -0,0 +1,30 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="csrf-token" content="{{ csrf_token() }}">
<title>{% block title %}gitops-watcher{% endblock %}</title>
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;700&display=swap" rel="stylesheet">
<link rel="stylesheet" href="{{ url_for('static', filename='style.css') }}">
</head>
<body>
<canvas id="rain" aria-hidden="true"></canvas>
<div class="wrap">
{% block content %}{% endblock %}
</div>
{% block overlays %}{% endblock %}
<div class="toasts" id="toasts" aria-live="polite">
{% for kind, msg in get_flashed_messages(with_categories=true) %}
<div class="toast {{ 'error' if kind == 'error' else '' }}">{{ msg }}</div>
{% endfor %}
</div>
<script src="{{ url_for('static', filename='app.js') }}"></script>
</body>
</html>