From a554e246bf0143c2a79fc3216d4e492428647223 Mon Sep 17 00:00:00 2001 From: furyhawk Date: Tue, 14 Jul 2026 22:33:38 +0800 Subject: [PATCH] feat: add fast debug workflow section to AGENTS.md and organize engines in settings.yml --- AGENTS.md | 14 ++++++++++++++ swarm/searxng/settings.yml | 9 +++++++++ 2 files changed, 23 insertions(+) diff --git a/AGENTS.md b/AGENTS.md index a4f4d46..037b567 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -41,6 +41,20 @@ - Swarm services deploy: `make deploy-services` - Ansible RKE2 cluster bootstrap: `cd ansible/rke2 && ansible-playbook site.yaml -i inventory/hosts.ini --key-file ~/.ssh/id_rsa -K` +## Fast Debug Workflow +- Use this order for quicker triage: identify failing unit -> inspect recent logs -> verify rendered config -> apply smallest restart. +- Find suspect Swarm services quickly: `docker service ls` +- Inspect service state and recent task failures: `docker service ps --no-trunc` +- Tail recent service logs with timestamps: `docker service logs --since 10m ` +- Follow logs live during a rollout: `docker service logs -f ` +- Restart only one service after config changes: `docker service update --force ` +- Confirm service converged after update: `docker service ps ` +- Validate compose syntax and env interpolation before deploy: `docker compose -f compose.yml config` +- Render a Swarm stack file locally for sanity checks: `docker compose -f swarm/.yml config` +- For SearXNG specifically, runtime config is host-mounted at `/var/data/config/searxng`; repo edits in `swarm/searxng/` require syncing to host path before restart. +- For Traefik/router issues, verify labels and entrypoints first, then check `traefik` service logs before changing domains or ports. +- Prefer `--since 5m` or `--since 10m` during incident response to avoid scanning stale logs. + ## Lint And Validation Commands - There is no repo-wide lint target or CI workflow checked into the repository. - There are no configured `ruff`, `black`, `flake8`, `mypy`, `yamllint`, `ansible-lint`, or `pytest` configs in the root. diff --git a/swarm/searxng/settings.yml b/swarm/searxng/settings.yml index b62453d..e92e582 100644 --- a/swarm/searxng/settings.yml +++ b/swarm/searxng/settings.yml @@ -24,5 +24,14 @@ request: ui: static_use_hash: true + +engines: + - name: brave + disabled: true + - name: ahmia + disabled: true + - name: torch + disabled: true + valkey: url: valkey://tasks.valkey_valkey:6379/0