> ## Documentation Index
> Fetch the complete documentation index at: https://datum.net/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Deploy an app

> Deploy draw.io to Datum Compute and open it in your browser through an Application Load Balancer that Datum attaches for you.

> [!NOTE]
>
> Compute is in preview. The `v1alpha` APIs can change, and Datum reviews Compute access requests manually.

## Before you begin

* Create a Datum Cloud account, an organization, and a project. For more information, see [Account setup](https://datum.net/docs/getting-started/account-setup.md).
* Install `datumctl`. For more information, see [Install](https://datum.net/docs/datumctl/install.md).
* Run `datumctl login`. For more information, see [Logging in](https://datum.net/docs/datumctl/auth/logging-in.md).
* Run `datumctl plugin install compute`. For more information, see [Using plugins](https://datum.net/docs/datumctl/plugins/using-plugins.md).
* Select the project to deploy in with `datumctl ctx use ORG_ID/PROJECT_ID`. To confirm your account and project, run `datumctl whoami`. For more information, see [Contexts and scoping](https://datum.net/docs/datumctl/contexts-and-scoping.md).
* Make sure that Compute access is active for the project. Run `datumctl compute access` and check that the `Status` line shows `Active`. If it doesn't, see [Request Compute access](https://datum.net/docs/compute/limits-and-quotas.md#request-access).

## Deploy draw\.io

This page deploys [draw.io](https://www.drawio.com/), an open source diagramming app, using the official `docker.io/jgraph/drawio` image with the `general-purpose` runtime class, which runs standard container images without changes. The app fits in one Instance (1 vCPU and 2 GiB of memory), stores nothing on the Instance, and needs no passwords or config files.

**1. Deploy draw\.io**

To deploy draw\.io to Dallas (`us-central-1`) and publish it on a public URL, run the following command:

```bash theme={null}
datumctl compute deploy drawio \
  --image=docker.io/jgraph/drawio:31.4.6 \
  --runtime-class=general-purpose \
  --location=us-central-1 \
  --http-port=8080
```

The flags do the following:

* `--image`: the container image to run, pinned to a draw\.io release. Compute requires the registry host in the image reference, such as `docker.io`.
* `--runtime-class=general-purpose`: runs the image as a standard container in a lightweight virtual machine. Without this flag, Datum uses the `unikernel` class, which needs a [specially packaged image](https://datum.net/docs/compute/runtimes/unikernels.md). To compare the two, see [Choose a runtime class](https://datum.net/docs/compute/runtimes/overview).
* `--location=us-central-1`: runs one Instance in Dallas.
* `--http-port=8080`: attaches an ALB to the workload and publishes port `8080`, where draw\.io serves HTTP.

The command asks you two questions:

1. The first time you deploy in a project, it asks whether to create a network named `default`. Enter `y`.
2. It prints a plan and asks `Apply? (Y/n)`. Enter `y`.

The command then creates the workload, waits for the Instance to start, and publishes the URL. The end of the output is similar to the following:

```text theme={null}
Rollout complete in 22s.

Publishing...
  Backends     1 healthy across us-central-1
  Edge         programmed
  Certificate  issued

  https://peril-oven-p53hn.datumproxy.net
```

The last line is the hostname of the ALB attached to the workload. Your hostname is different. The command also saves the workload definition to `workload.yaml` in the current directory.

**2. Check that draw\.io is available**

To list the workloads in your project, run the following command:

```bash theme={null}
datumctl compute workloads
```

Continue when `HEALTH` is `Available` and `READY` is `1/1`. The `URL` column shows the ALB hostname from the deploy output.

**3. Open draw\.io and draw a diagram**

In your web browser, go to the URL from the deploy output. Datum's ALB serves draw\.io over HTTPS, and the app opens a blank diagram. If the browser can't find the site, wait a minute and try again.

Click the rectangle in the **General** shape panel, double-click it, and type `Hello from Datum`. To keep it, click **File** > **Export as** > **PNG...**.

The editor runs in your browser, so your diagrams stay with you even when Datum restarts or replaces the Instance.

**4. Optional: See the Instance**

To list the workload's Instances, run the following command:

```bash theme={null}
datumctl compute instances --workload=drawio
```

The `INTERNAL IP` column shows the Instance's private IPv6 address on the `default` [gVPC](https://datum.net/docs/galactic-vpc/overview.md) network. The Instance has no public address, so traffic from the internet reaches draw\.io only through the ALB.

## Clean up

1. To delete the draw\.io workload, its Instance, and its ALB, run the following command and enter `y` to confirm:

   ```bash theme={null}
   datumctl compute destroy drawio
   ```

2. Delete `workload.yaml` from the current directory.

3. Optional: If this tutorial created the `default` network and no other workload uses it, delete the network:

   ```bash theme={null}
   datumctl delete network default
   ```

## What's next

* To deploy your own image, check that your app listens on IPv6 and serves plain HTTP. During the preview, Instances have no persistent disks and no readiness checks. For details, see [Compute limitations](https://datum.net/docs/compute/limitations-and-roadmap.md#limitations).
* To pass configuration and secrets to a workload, see [Compute configuration](https://datum.net/docs/compute/configuration.md).
* To package your own app as a fast-starting unikernel, see [Unikernels](https://datum.net/docs/compute/runtimes/unikernels.md).
* To run in more locations or with more Instances, see [Placement and scaling](https://datum.net/docs/compute/placement-and-scaling.md).
* To learn how Datum's control plane turns your resources into running Instances, DNS, and load balancers, see [Platform API](https://datum.net/docs/platform/kubernetes.md).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.