feat(infra): каркас проекта — uv, ruff, mypy, pytest, Docker Compose

- pyproject: Python 3.12, зависимости ADR-009, ruff/mypy strict/pytest/coverage
- app/: точка входа-заглушка с graceful shutdown по SIGTERM
- Dockerfile: multi-stage, uv, non-root (uid 10001), git+ssh для коммитов (#9);
  apt по HTTPS — в некоторых сетях обычный HTTP к deb.debian.org заблокирован
- docker-compose: bot + postgres 16, healthcheck, лимиты памяти, ротация логов
- Makefile: install/lint/fmt/test/cov/up/down/logs/ps; .env.example

Refs #3

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-13 23:14:53 +03:00
co-authored by Claude Opus 5.5
parent 6ea414752b
commit 8dfcef94c9
16 changed files with 1139 additions and 0 deletions
+28
View File
@@ -0,0 +1,28 @@
"""Entry point. For now a stub that idles until stopped; the bot itself lands in #4."""
import asyncio
import logging
import signal
from app import __version__
log = logging.getLogger("tgit")
async def run(stop: asyncio.Event) -> None:
log.info("tgit %s started", __version__)
await stop.wait()
log.info("tgit stopped")
def main() -> None:
logging.basicConfig(level=logging.INFO, format="%(asctime)s %(levelname)s %(name)s: %(message)s")
async def _main() -> None:
stop = asyncio.Event()
loop = asyncio.get_running_loop()
for sig in (signal.SIGINT, signal.SIGTERM):
loop.add_signal_handler(sig, stop.set)
await run(stop)
asyncio.run(_main())