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"
