{
  "version": 5,
  "script": {
    "version": "0.1.0",
    "changeLog": "Auto-generated draft from TrueNAS cloudreve 1.0.56"
  },
  "requirements": {
    "locations": ["ApplicationsPerformance"],
    "specifications": ["2CORE"],
    "permissions": ["READ_WRITE_LOCATIONS"],
    "ports": [30409]
  },
  "ensure_directories_exists": [
    {"path": "$LOCATION(ApplicationsPerformance)"},
    {"path": "$LOCATION(ApplicationsPerformance)/cloudreve"},
    {
      "path": "$LOCATION(ApplicationsPerformance)/cloudreve/data",
      "owner": {"user": "apps"},
      "snapshot": {"id": "data"}
    },
    {
      "path": "$LOCATION(ApplicationsPerformance)/cloudreve/meili_data",
      "owner": {"user": "apps"},
      "snapshot": {"id": "meili_data"}
    },
    {
      "path": "$LOCATION(ApplicationsPerformance)/cloudreve/postgres_data",
      "owner": {"user": "netdata", "group": "docker"},
      "snapshot": {"id": "postgres_data"}
    }
  ],
  "app_values": {
    "cloudreve": {
      "db_password": "$RANDOM_STRING(16)",
      "redis_password": "$RANDOM_STRING(16)"
    },
    "storage": {
      "data": "$HOST_PATH($LOCATION(ApplicationsPerformance)/cloudreve/data)",
      "meili_data": "$HOST_PATH($LOCATION(ApplicationsPerformance)/cloudreve/meili_data)",
      "postgres_data": "$HOST_PATH($LOCATION(ApplicationsPerformance)/cloudreve/postgres_data)"
    },
    "network": {
      "web_port": {"bind_mode": "published", "port_number": 30409}
    },
    "resources": {"limits": {"cpus": 2, "memory": "$MEMORY(10%, 4096)"}}
  }
}
