# Hive Proposal for Container Deployment and Scaling

A Hive file is a YAML document structured into three main sections: `containers`, `scaling`, and `geographical_scaling`.

#### Containers

The `containers` section allows you to define individual containers, each with its specific properties. For instance, `gpu_app_container` is a container profile representing an application requiring GPU resources to run. Alongside it, the `webapp_container` is also defined. This indicates that the Hive file can deploy multiple containers simultaneously, each with its own profile within a single Hive file.

**GPU-Enabled Container & Standard WebApp Container**

```yaml
containers:
  - name: gpu_app_container
    location: /path/to/Dockerfile
    profile:
      gpu:
        enabled: true
        type: Nvidia
        model: GeForce_RTX_3080
        memory: 10GB
        cores: 8704
        # Add other GPU properties for gpu_container here
    resources:
      cpu: 4
      memory: 8GB
    scaling:
      auto_scale: true

  - name: webapp_container
    location: /path/to/Dockerfile
    profile: null
    resources:
      cpu: 2
      memory: 4GB
    environment: null
    scaling:
      auto_scale: true
```

#### Scaling

The scaling section includes parameters for auto-scaling. If `auto_scale` is set to true, specifying `max_scale` becomes optional.

```yaml
scaling:
  auto_scale: true
  #max_scale: 10 # Optional when auto_scale is true
```

#### Geographical Scaling

The `geographical_scaling` section enables geographical scaling and specifies scaling amounts for each container based on location. It ensures data availability in specific regions.

```yaml
geographical_scaling:
  enabled: true
  scale_amount: 10 #only 10 copies of this app will be in the specified region 
    - container: gpu_container
      location: NA
      amount: $dynamic_amount
    - container: webapp_container
      location: EU
      amount: $dynamic_amount
```

#### Important Note

Resource Availability: Proposals may be rejected if the specified resources are unavailable in the network. Ensure alignment with the available resources in the decentralized infrastructure. Explore available nodes and their resources via the [network explorer](https://explorer.dockhive.io).


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.dockhive.io/hive-proposal-for-container-deployment-and-scaling.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
