docs: README по требованиям к оформлению и демо-сервисы examples/ (#19)
CI / ruff · mypy · pytest (pull_request) Successful in 26m33s

- README: цели и задачи, что реализовано, развёртывание (локально за 5 минут
  и полный стек), переменные, команды и данные, используемые API,
  ограничения и лимиты, что не сделано, структура репозитория
- examples/: hello (healthy + материал для grep/агента), crash (💥 и 🔁),
  cpu_hog (🔥), unhealthy (🩺), syntax_error/lint_fail для коммита,
  вопросы агенту и атаки; make demo-up / demo-down в том же Compose-проекте
- make local-proxy: read-only Docker API для `make run`
- ARCHITECTURE: краш при restart-политике и гистерезис алертов

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-17 15:56:47 +03:00
co-authored by Claude Opus 5.5
parent 79ea5ce2a5
commit d246296dd2
14 changed files with 417 additions and 14 deletions
+15 -1
View File
@@ -1,4 +1,4 @@
.PHONY: install lint fmt typecheck test cov up down logs ps run demo-repo
.PHONY: install lint fmt typecheck test cov up down logs ps run demo-repo demo-up demo-down local-proxy
install:
uv sync
@@ -45,3 +45,17 @@ demo-repo:
&& git -c user.name=tgit-bot -c user.email=tgit-bot@users.noreply.tgit commit -qm "init: uploads template"
@git clone -q --bare data/demo-seed $(DEMO_REPO) && rm -rf data/demo-seed
@echo "GIT_UPLOADS_URL=$(DEMO_REPO)"
# Demo services (examples/) next to the bot: they show up in «Статус», «Логи» and raise alerts
DEMO := docker compose -f docker-compose.yml -f examples/docker-compose.yml
demo-up:
$(DEMO) up -d demo-hello demo-crash demo-cpu-hog demo-unhealthy
demo-down:
$(DEMO) rm -sf demo-hello demo-crash demo-cpu-hog demo-unhealthy
# Docker API for `make run` (bot outside Docker): the same read-only proxy, on localhost only.
# Then DOCKER_URL=http://127.0.0.1:23750 in .env — «Статус», «Логи» and alerts see this machine's containers.
local-proxy:
docker run -d --rm --name tgit-local-proxy -e CONTAINERS=1 \
-v /var/run/docker.sock:/var/run/docker.sock:ro -p 127.0.0.1:23750:2375 tecnativa/docker-socket-proxy:0.3.0