{
  "version": 5,
  "script": {
    "version": "0.1.0",
    "changeLog": "Auto-generated draft from TrueNAS calibre-web 2.1.8"
  },
  "requirements": {
    "locations": ["ApplicationsPerformance", "Documents", "Media"],
    "specifications": ["2CORE"],
    "permissions": ["READ_WRITE_LOCATIONS"],
    "ports": [31067]
  },
  "ensure_directories_exists": [
    {"path": "$LOCATION(ApplicationsPerformance)"},
    {"path": "$LOCATION(ApplicationsPerformance)/calibre-web"},
    {"path": "$LOCATION(Documents)", "network_share": true},
    {"path": "$LOCATION(Media)", "network_share": true},
    {
      "path": "$LOCATION(ApplicationsPerformance)/calibre-web/config",
      "snapshot": {"id": "config"}
    }
  ],
  "app_values": {
    "storage": {
      "config": "$HOST_PATH($LOCATION(ApplicationsPerformance)/calibre-web/config)",
      "books": "$HOST_PATH($LOCATION(Documents))",
      "additional_storage": [
        "$MOUNTED_HOST_PATH($LOCATION(Media), /media)"
      ]
    },
    "network": {
      "web_port": {"bind_mode": "published", "port_number": 31067}
    },
    "resources": {"limits": {"cpus": 2, "memory": "$MEMORY(10%, 4096)"}}
  }
}
