---

version: '2'
services:
  kitt_imager:
    image: "docker-registry.zooxlabs.com/kitt_imager:{{ kitt_imager_image_version }}"
    container_name: kitt_imager
    restart: unless-stopped
    network_mode: "host"
    environment:
      - KITT_IMAGER__NETWORK_DAEMON__SLEEP_DURATION_PER_ITERATION_SECS={{ sleep_duration_per_iteration_in_secs }}
      - KITT_IMAGER__NETWORK_DAEMON__ENABLED={{ kitt_imager_network_daemon_enabled }}
      - KITT_IMAGER__COBBLER_CLIENT__IMAGE_THRESHOLD_IN_SECONDS={{ image_threshold_in_seconds }}
      - KITT_IMAGER__COBBLER_CLIENT__BRANCH_INFO_URL={{ kitt_imager_branch_info_service }}
      - KITT_IMAGER__COBBLER_CLIENT__STATUS_URL={{ kitt_imager_status_service }}
      - KITT_IMAGER__COBBLER_CLIENT__PING_CHECK_TIME_SECONDS={{ kitt_imager_ping_check_seconds }}
      - KITT_IMAGER__COBBLER_CLIENT__SSH_CHECK_TIME_SECONDS={{ kitt_imager_ssh_check_seconds }}
      - KITT_IMAGER__SLACK_CLIENT__TOKEN={{ kitt_imager_slack_api_token }}
      - KITT_IMAGER__SLACK_CLIENT__CHANNEL={{ kitt_imager_slack_channel }}
      - KITT_IMAGER__SLACK_CLIENT__IMAGING_SERVER_NAME={{ inventory_hostname }}
      - KITT_IMAGER__VAULT_CLIENT__LDAP_PASSWORD={{ kitt_imager_cobbler_ldap_password }}
      - KITT_IMAGER__LOGGING__LEVEL={{ kitt_imager_log_level }}
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
    logging:
      options:
        max-size: "5m"
        max-file: "5"
