{
  "version": 5,
  "script": {
    "version": "0.1.0",
    "changeLog": "Auto-generated draft from TrueNAS spottarr 1.1.12"
  },
  "installation_questions": [
    {
      "question": "Username",
      "type": "text",
      "key": "username",
      "required": true
    },
    {
      "question": "Password",
      "type": "password",
      "key": "password",
      "required": true
    }
  ],
  "requirements": {
    "locations": ["ApplicationsPerformance"],
    "specifications": ["2CORE"],
    "permissions": ["READ_WRITE_LOCATIONS"],
    "ports": [30151]
  },
  "ensure_directories_exists": [
    {"path": "$LOCATION(ApplicationsPerformance)"},
    {"path": "$LOCATION(ApplicationsPerformance)/spottarr"},
    {
      "path": "$LOCATION(ApplicationsPerformance)/spottarr/data",
      "owner": {"user": "apps"},
      "snapshot": {"id": "data"}
    }
  ],
  "app_values": {
    "spottarr": {
      "usenet": {
        "hostname": "$SERVER_LAN_IP",
        "username": "$QUESTION(username)",
        "password": "$QUESTION(password)"
      }
    },
    "storage": {
      "data": "$HOST_PATH($LOCATION(ApplicationsPerformance)/spottarr/data)"
    },
    "network": {
      "web_port": {"bind_mode": "published", "port_number": 30151}
    },
    "resources": {"limits": {"cpus": 2, "memory": "$MEMORY(10%, 4096)"}}
  }
}
