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

# Quick start: Docker Compose

This quick start guide explains how to use Tensor9 BYOC to deploy your existing Docker Compose app as a private appliance.

![Your docker-compose.yml file declares services, networks and volumes as parts of a Docker Compose origin stack definition containing Compose YAML. The arrow shows the input definition.](https://mintcdn.com/tensor9/3Gue6wRqgyBt6U1l/images/diagrams/docker-compose-origin-definition-wide-dark.svg?fit=max\&auto=format\&n=3Gue6wRqgyBt6U1l\&q=85\&s=768f516a4f0aab6302d77eef1f3b8bbb)

![Your docker-compose.yml file declares services, networks and volumes as parts of a Docker Compose origin stack definition containing Compose YAML. The arrow shows the input definition.](https://mintcdn.com/tensor9/3Gue6wRqgyBt6U1l/images/diagrams/docker-compose-origin-definition-wide-light.svg?fit=max\&auto=format\&n=3Gue6wRqgyBt6U1l\&q=85\&s=45b362dc9f1203cec2db45528775a730)

![Your docker-compose.yml file declares services, networks and volumes as parts of a Docker Compose origin stack definition containing Compose YAML. The arrow shows the input definition.](https://mintcdn.com/tensor9/3Gue6wRqgyBt6U1l/images/diagrams/docker-compose-origin-definition-stacked-dark.svg?fit=max\&auto=format\&n=3Gue6wRqgyBt6U1l\&q=85\&s=1fad9ffcd37cba0b4dc05c69fc4ea768)

![Your docker-compose.yml file declares services, networks and volumes as parts of a Docker Compose origin stack definition containing Compose YAML. The arrow shows the input definition.](https://mintcdn.com/tensor9/3Gue6wRqgyBt6U1l/images/diagrams/docker-compose-origin-definition-stacked-light.svg?fit=max\&auto=format\&n=3Gue6wRqgyBt6U1l\&q=85\&s=7b11e1c62280ba950bf1e17d8d048fcc)

A Docker Compose origin stack definition contains your Compose YAML, including its services, networks and volumes. The arrow shows the input definition.

As you follow this guide, you will:

* Create your Tensor9 account and set up a Tensor9 BYOC control plane in your AWS account.
* Create an app and bind a Docker Compose file as its origin stack.
* Onboard a customer and release your app to their appliance.
* Release infrastructure changes.

## Prerequisites

* A Google account to sign up for Tensor9.
* Create an AWS account for Tensor9 BYOC. We will refer to this as the Tensor9 BYOC AWS account.

  **Important:**

  * Your Tensor9 BYOC AWS account should be a dedicated AWS account used only for Tensor9 BYOC. This reduces the risk of conflicts between your app deployed in a Tensor9 BYOC appliance and any other software, infrastructure, or resources you might have in a general-purpose AWS account.
  * Tensor9 BYOC sets up your control plane in the AWS `us-west-2` (US West, Oregon) region. Other regions are not available yet.
* Install [AWS CLI](https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-getting-started.html) in your environment, and [set up an AWS CLI profile](https://docs.aws.amazon.com/cli/v1/userguide/cli-configure-files.html) that has admin permissions to your new AWS account. This guide calls it `my-vendor-aws`.
* A second AWS account to act as your first customer. You will open the customer setup link while signed in to this account.
* Have a docker-compose.yml file ready with your multi-container application.
* Ensure all container images referenced in your compose file are pushed to container registries (ECR, Docker Hub, GitHub Container Registry, etc.).

## Create your account and control plane

1. Follow [Get a Tensor9 API key](https://docs.tensor9.com/byoc/getting-started/api-key.md) to sign up and install the `tensor9` CLI.

2. Export your API key and set up your control plane in your new AWS account (about 10 minutes):

```bash theme={null}
export T9_API_KEY=<your API key>
tensor9 vendor setup -awsProfile my-vendor-aws
```

Add `-region us-west-2` if your AWS configuration defaults to another region. Setup makes its controller profile your CLI default, so the commands below need no API key or profile options.

3. Create a new Tensor9 BYOC **app**.

```bash theme={null}
tensor9 app create -name compose-quickstart -displayName "Compose example app"
```

**Note:** The length of the `displayName` field must be 32 characters or fewer.

## Publish your Docker Compose file and bind it to your app

Tensor9 BYOC works by compiling your docker-compose.yml file for each appliance you want to deploy to. Your next step is to **publish** your compose file to your Tensor9 BYOC control plane:

```bash theme={null}
tensor9 stack publish-direct \
  -appName compose-quickstart \
  -stackType DockerCompose \
  -stackName my-app-compose \
  -file docker-compose.yml
```

This command publishes the Compose definition directly to your control plane and binds it to `compose-quickstart`. Publishing again with the same stack name updates that origin stack and retains the existing binding.

## Onboard a customer

Customers install your app in their own cloud accounts through a setup link. In this guide, your second AWS account acts as the customer.

1. Create a form factor that lets customers install your app in AWS:

```bash theme={null}
tensor9 form-factor create \
  -appName compose-quickstart \
  -formFactorName aws-connected \
  -env Aws \
  -connectivity Connected
```

2. Create a setup link for your customer:

```bash theme={null}
tensor9 app setup -appName compose-quickstart -customerName acme-corp
```

The command creates the customer `acme-corp` if it does not exist yet and prints the customer's setup link.

3. Sign in to the AWS console of your customer AWS account, then open the setup link in the same browser. Follow the setup wizard to choose the environment, then download and apply the infrastructure templates in the customer account. The [customer installation guide](https://docs.tensor9.com/byoc/customer/installation/overview.md) describes each step.

4. Check the report and confirm that the customer's appliance is ready before releasing:

```bash theme={null}
tensor9 report
```

## Release to your customer

1. Create a release for your customer:

```bash theme={null}
tensor9 stack release create \
  -appName compose-quickstart \
  -customerName acme-corp \
  -vendorVersion "1.0.0" \
  -description "First release of my Docker Compose app via Tensor9" \
  -notes "By engineer@vendor.co"
```

Compose releases deploy automatically to the customer's appliance. The CLI follows deployment progress; it does not download a Terraform workspace or require a separate apply command.

2. View the deployed services using a Kubernetes context already configured for that appliance:

```bash theme={null}
kubectl get deployments
kubectl get services
kubectl get pods
```

3. Access your application through the load balancer. Get the load balancer endpoint for services with exposed ports:

```bash theme={null}
kubectl get service <service-name> -o jsonpath='{.status.loadBalancer.ingress[0].hostname}'
```

## Release an infrastructure change

You can release infrastructure changes to your Docker Compose stack at any time.

**1. Update your docker-compose.yml file**

Make any desired changes to your compose file. For example, you could:

* Add a new service
* Change resource limits
* Add environment variables
* Update container image versions

**Important:** The next step will overwrite the previous origin stack. All new releases will come from the most recently published version of your origin stack.

**2. Re-publish your origin stack**

```bash theme={null}
tensor9 stack publish-direct \
  -appName compose-quickstart \
  -stackType DockerCompose \
  -stackName my-app-compose \
  -file docker-compose.yml
```

The command reports the published stack and confirms that it remains bound to the app. Keep the same `-stackName my-app-compose` when updating this origin stack.

**3. Create a new release**

```bash theme={null}
tensor9 stack release create \
  -appName compose-quickstart \
  -customerName acme-corp \
  -vendorVersion "1.0.1" \
  -description "Added caching layer and updated API resources" \
  -notes "By engineer@vendor.co"
```

The release deploys automatically to the customer's appliance. Follow the CLI deployment progress before verifying the changes.

**4. Verify the changes**

```bash theme={null}
kubectl get deployments
kubectl get services
kubectl get pods
```

You should see your new services, updated resource limits, or other changes reflected in the Kubernetes resources.

## Clean up

When you finish with this guide, remove what you created. You can do the following yourself today:

```bash theme={null}
tensor9 stack unbind -appName compose-quickstart -stackName my-app-compose
```

Unbinding stops new releases of the stack. It does not remove anything already deployed.

Some steps currently need Tensor9 support. Tensor9 deploys Docker Compose releases into the customer's appliance for you, and removing that deployment, the customer's appliance or your control plane in your AWS account is not yet available to you directly. To remove them, email [hello@tensor9.com](mailto:hello@tensor9.com) with your vendor ID, which `tensor9 whoami` reports, and the app and customer names. Do not delete control plane resources from your AWS account by hand.

## Next steps

Now that you've deployed a Docker Compose app with Tensor9 BYOC:

* Review the [Docker Compose origin stack documentation](https://docs.tensor9.com/byoc/origin-stack/docker-compose.md) for advanced features
* Learn about [stack tuning documents](https://docs.tensor9.com/byoc/origin-stack/docker-compose.md#tuning-container-resources) to customize deployments per customer
* Explore [form factors](https://docs.tensor9.com/byoc/fundamentals/key-concepts.md#form-factor) to deploy to different cloud providers
* Set up [observability](https://docs.tensor9.com/byoc/fundamentals/observability.md) to monitor your appliances


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