ci: align deployment on Kuby (Docker + rsync + SSH key + healthcheck + rollback)
All checks were successful
ci / ci (push) Successful in 44s
ci / ci (pull_request) Successful in 43s

- Add HTTP /health endpoint (aiohttp) for Docker healthcheck + post-deploy check
- Dockerfile HEALTHCHECK hits /health; docker-compose exposes 1890, container vision-bot
- scripts/deploy_runner.sh runs on .117 (docker compose build/restart)
- .forgejo/workflows/deploy.yml: single job on omhk-deploy runner (clone, syntax test,
  rsync, deploy, health check, auto-rollback) like Kuby
- .forgejo/workflows/ci.yml: single job (ruff + pytest) on dev/PR
This commit is contained in:
Mathis 2026-09-19 16:04:59 +02:00
parent e32ca9c8fb
commit e22a98a4a3
8 changed files with 308 additions and 48 deletions

View file

@ -4,6 +4,7 @@ import sys
import config
from bot import VisionBot
from health import start_health_server
logging.basicConfig(
level=logging.INFO,
@ -24,8 +25,10 @@ async def main():
instance = "DEV" if config.DEV else "PROD"
logger.info(f"Lancement de Vision Studio [{instance}]...")
bot = VisionBot()
await start_health_server(config.HEALTH_PORT)
bot = VisionBot()
try:
await bot.start(config.DISCORD_TOKEN)
except KeyboardInterrupt: