feat: dedicated auto-healing agent — sidecar container + pi agent definition
Deploy Staging / build (push) Failing after 10m51s
Deploy Staging / build (push) Failing after 10m51s
- auto-healer/Dockerfile: lightweight Alpine container with Docker CLI - auto-healer/auto-heal-agent.sh: real-time fault detection + remediation engine - Detects: crash, OOM, DB disconnect, gateway down, disk pressure - Fixes: restart, rollback, nginx reload, prune, escalate - Sliding window restart tracking (3/hr max) - auto-healer/docker-compose.healer.yml: sidecar deployment config - Mounts Docker socket for event monitoring - Host network mode for health checks - Persistent state in /var/state/falah - .pi/agents/auto-healer.md: pi agent definition for manual invocation
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
version: "3.8"
|
||||
services:
|
||||
falah-auto-healer:
|
||||
build:
|
||||
context: ./auto-healer
|
||||
dockerfile: Dockerfile
|
||||
image: falah-auto-healer:latest
|
||||
container_name: falah-auto-healer
|
||||
restart: unless-stopped
|
||||
volumes:
|
||||
- /var/run/docker.sock:/var/run/docker.sock:ro
|
||||
- /var/log/falah:/var/log/falah
|
||||
- /var/state/falah:/var/state/falah
|
||||
environment:
|
||||
- CONTAINER_NAME=falah-mobile-staging
|
||||
- HEALTH_URL=http://192.168.0.11:4014/mobile/api/health
|
||||
- GATEWAY_URL=http://192.168.0.11:7878/mobile/api/health
|
||||
- CHECK_INTERVAL=30
|
||||
- MAX_RESTARTS_PER_HOUR=3
|
||||
- ROLLBACK_IMAGE=falah-mobile:rollback
|
||||
network_mode: "host"
|
||||
logging:
|
||||
driver: "json-file"
|
||||
options:
|
||||
max-size: "10m"
|
||||
max-file: "3"
|
||||
Reference in New Issue
Block a user