version: "3.8"
services:
  falah-dns-healer:
    build:
      context: ./dns-router-healer
      dockerfile: Dockerfile
    image: falah-dns-healer:latest
    container_name: falah-dns-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:
      - DOMAINS=falahos.my api.falahos.my git.falahos.my app.falahos.my
      - DIRECT_HEALTH=http://localhost:4014/mobile/api/health
      - GATEWAY_URL=http://localhost:7878/mobile/api/health
      - TUNNEL_URL=https://falahos.my/mobile/api/health
      - TUNNEL_PRIMARY=cloudflare-YT01
      - TUNNEL_FALLBACK=falah-tunnel
      - GATEWAY_CONTAINER=falah-umbrel-api-gateway
      - TRAEFIK_CONTAINER=falah_traefik
      - CHECK_INTERVAL=60
    network_mode: "host"
    logging:
      driver: "json-file"
      options:
        max-size: "10m"
        max-file: "3"
