services:
  tapo-enhance:
    image: ghcr.io/aaronrohrbacher/tapo-enhance:latest
    pull_policy: missing
    network_mode: host
    cap_add:
      - NET_RAW
      - NET_ADMIN
    environment:
      APP_PORT: ${APP_PORT:-8000}
      TAPO_CACHE_ROOT: /data
      TAPO_HOST: ${TAPO_HOST:-}
      TAPO_USER: ${TAPO_USER:-admin}
      TAPO_SUBNET: ${TAPO_SUBNET:-192.168.1.0/24}
      TAPO_CHILD_ID: ${TAPO_CHILD_ID:-}
      TAPO_PASSWORD_FILE: /run/secrets/tapo_password
      TAPO_CLOUD_PASSWORD_FILE: /run/secrets/tapo_cloud_password
    volumes:
      - ./cache:/data
      - ./custom-themes:/app/themes/custom:ro
      - ./secrets:/run/secrets:ro
    restart: unless-stopped
