feat: drop AGENT_LOCATION (agent location is central-record-only); image 20260821-3

This commit is contained in:
sam
2026-08-21 06:33:21 +00:00
parent fef0a7d026
commit 3042bac6ae
3 changed files with 12 additions and 12 deletions
+4 -3
View File
@@ -28,7 +28,7 @@ contains no secrets.
git clone https://gitea.noctools.nz/noctools/onlyscans-agent-kit.git
cd onlyscans-agent-kit
cp .env.agent.example .env
# edit .env: AGENT_IDENTITY / AGENT_PASSWORD / AGENT_LOCATION
# edit .env: AGENT_IDENTITY / AGENT_PASSWORD
docker compose -f docker-compose.agent.yml up -d
docker logs -f onlyscans-agent
```
@@ -36,7 +36,8 @@ docker logs -f onlyscans-agent
The worker image pulls anonymously — no `docker login` required.
**Expected log lines on a healthy start:**
`authenticated` … `agent <name>: AGENT_LOCATION "<loc>" validated`.
`authenticated to PocketBase …` — that's it. (The agent's location is
carried by its central record; nothing local participates.)
A rejected password or unknown location name is FATAL by design —
check the values in `.env` and `docker compose -f docker-compose.agent.yml up -d --force-recreate`.
@@ -78,6 +79,6 @@ The agent re-authenticates and resumes polling.
| Symptom | Meaning |
|---|---|
| `no configuration file provided: not found` | You ran a follow-up `docker compose logs`/`ps` without `-f docker-compose.agent.yml` — the kit's compose file has a non-default name, so it isn't auto-discovered. Re-run with `-f docker-compose.agent.yml`, or use plain `docker logs onlyscans-agent` (the container itself is fine) |
| Container exits ~1 s after start | Bad `AGENT_IDENTITY`, `AGENT_PASSWORD`, or unknown `AGENT_LOCATION` — fatal by design; fix `.env` and recreate |
| Container exits ~1 s after start | Bad `AGENT_IDENTITY` or `AGENT_PASSWORD` — fatal by design; fix `.env` and recreate |
| Agent shows **offline** centrally (`/agents`) | Container down, or no egress to `scan-api.noctools.nz:443` — check `docker logs onlyscans-agent` |
| Scans stay queued | Agent online but for a different location, or targets unreachable from the container's network — try the host-network variant |