{
  "version": 5,
  "script": {
    "version": "0.1.0",
    "changeLog": "Auto-generated draft from TrueNAS fireshare 1.1.39"
  },
  "installation_questions": [
    {
      "question": "Admin username",
      "type": "text",
      "key": "admin_username",
      "required": true
    },
    {
      "question": "Admin password",
      "type": "password",
      "key": "admin_password",
      "required": true
    }
  ],
  "requirements": {
    "locations": ["ApplicationsPerformance", "Videos", "Media"],
    "specifications": ["4CORE"],
    "permissions": ["READ_WRITE_LOCATIONS"],
    "ports": [30175]
  },
  "ensure_directories_exists": [
    {"path": "$LOCATION(ApplicationsPerformance)"},
    {"path": "$LOCATION(ApplicationsPerformance)/fireshare"},
    {"path": "$LOCATION(Videos)", "network_share": true},
    {"path": "$LOCATION(Media)", "network_share": true},
    {
      "path": "$LOCATION(ApplicationsPerformance)/fireshare/data",
      "snapshot": {"id": "data"}
    },
    {
      "path": "$LOCATION(ApplicationsPerformance)/fireshare/processed",
      "snapshot": {"id": "processed"}
    },
    {
      "path": "$LOCATION(ApplicationsPerformance)/fireshare/images",
      "snapshot": {"id": "images"}
    }
  ],
  "app_values": {
    "fireshare": {
      "admin_username": "$QUESTION(admin_username)",
      "admin_password": "$QUESTION(admin_password)",
      "secret_key": "$RANDOM_STRING(32)"
    },
    "storage": {
      "data": "$HOST_PATH($LOCATION(ApplicationsPerformance)/fireshare/data)",
      "processed": "$HOST_PATH($LOCATION(ApplicationsPerformance)/fireshare/processed)",
      "videos": "$HOST_PATH($LOCATION(Videos))",
      "images": "$HOST_PATH($LOCATION(ApplicationsPerformance)/fireshare/images)",
      "additional_storage": [
        "$MOUNTED_HOST_PATH($LOCATION(Media), /media)"
      ]
    },
    "network": {
      "web_port": {"bind_mode": "published", "port_number": 30175}
    },
    "resources": {"limits": {"cpus": 4, "memory": "$MEMORY(10%, 4096)"}}
  }
}
