{
  "version": 5,
  "script": {
    "version": "0.1.0",
    "changeLog": "Auto-generated draft from TrueNAS snapotter 2.0.16"
  },
  "requirements": {
    "locations": ["ApplicationsPerformance", "Media"],
    "specifications": ["2CORE"],
    "permissions": ["READ_WRITE_LOCATIONS"],
    "ports": [30428]
  },
  "ensure_directories_exists": [
    {"path": "$LOCATION(ApplicationsPerformance)"},
    {"path": "$LOCATION(ApplicationsPerformance)/snapotter"},
    {"path": "$LOCATION(Media)", "network_share": true},
    {
      "path": "$LOCATION(ApplicationsPerformance)/snapotter/data",
      "snapshot": {"id": "data"}
    },
    {
      "path": "$LOCATION(ApplicationsPerformance)/snapotter/workspace",
      "snapshot": {"id": "workspace"}
    },
    {
      "path": "$LOCATION(ApplicationsPerformance)/snapotter/postgres_data",
      "owner": {"user": "netdata", "group": "docker"},
      "snapshot": {"id": "postgres_data"}
    }
  ],
  "app_values": {
    "snapotter": {
      "db_password": "$RANDOM_STRING(16)",
      "redis_password": "$RANDOM_STRING(16)"
    },
    "storage": {
      "data": "$HOST_PATH($LOCATION(ApplicationsPerformance)/snapotter/data)",
      "workspace": "$HOST_PATH($LOCATION(ApplicationsPerformance)/snapotter/workspace)",
      "postgres_data": "$HOST_PATH($LOCATION(ApplicationsPerformance)/snapotter/postgres_data)",
      "additional_storage": [
        "$MOUNTED_HOST_PATH($LOCATION(Media), /media)"
      ]
    },
    "network": {
      "web_port": {"bind_mode": "published", "port_number": 30428}
    },
    "resources": {
      "limits": {"cpus": 2, "memory": "$MEMORY(10%, 4096)"},
      "gpus": "$GPU_CONFIG()"
    }
  }
}
