{
  "version": 5,
  "script": {
    "version": "0.1.0",
    "changeLog": "Auto-generated draft from TrueNAS roundcube 1.6.35"
  },
  "installation_questions": [
    {
      "question": "Default host",
      "type": "text",
      "key": "default_host",
      "required": true
    },
    {
      "question": "Smtp server",
      "type": "text",
      "key": "smtp_server",
      "required": true
    }
  ],
  "requirements": {
    "locations": ["ApplicationsPerformance"],
    "specifications": ["2CORE"],
    "permissions": ["READ_WRITE_LOCATIONS"],
    "ports": [31007]
  },
  "ensure_directories_exists": [
    {"path": "$LOCATION(ApplicationsPerformance)"},
    {"path": "$LOCATION(ApplicationsPerformance)/roundcube"},
    {
      "path": "$LOCATION(ApplicationsPerformance)/roundcube/html",
      "snapshot": {"id": "html"}
    },
    {
      "path": "$LOCATION(ApplicationsPerformance)/roundcube/config",
      "snapshot": {"id": "config"}
    },
    {
      "path": "$LOCATION(ApplicationsPerformance)/roundcube/temps",
      "snapshot": {"id": "temps"}
    },
    {
      "path": "$LOCATION(ApplicationsPerformance)/roundcube/postgres_data",
      "owner": {"user": "netdata", "group": "docker"},
      "snapshot": {"id": "postgres_data"}
    }
  ],
  "app_values": {
    "roundcube": {
      "db_password": "$RANDOM_STRING(16)",
      "default_host": "$QUESTION(default_host)",
      "smtp_server": "$QUESTION(smtp_server)"
    },
    "storage": {
      "html": "$HOST_PATH($LOCATION(ApplicationsPerformance)/roundcube/html)",
      "config": "$HOST_PATH($LOCATION(ApplicationsPerformance)/roundcube/config)",
      "temps": "$HOST_PATH($LOCATION(ApplicationsPerformance)/roundcube/temps)",
      "postgres_data": "$HOST_PATH($LOCATION(ApplicationsPerformance)/roundcube/postgres_data)"
    },
    "network": {
      "web_port": {"bind_mode": "published", "port_number": 31007}
    },
    "resources": {"limits": {"cpus": 2, "memory": "$MEMORY(10%, 4096)"}}
  }
}
