> For the complete documentation index, see [llms.txt](https://docs.metamanagement.dev/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.metamanagement.dev/products/helm-charts/docker-compose.md).

# Converting from docker-compose

If you normally stand up your deployment or dev environment with docker-compose, you can convert your docker-compose.yaml file to a Helm chart using [Kompose](https://kompose.io).

To install Kompose (assuming you are on macOS and have [Homebrew](https://brew.sh/) installed):

```bash
brew install kompose
```

{% hint style="info" %}
If you need instructions for a different platform or do not have access to Homebrew, please contact Metamanagement directly.
{% endhint %}

Once Kompose is installed, you need to add some labels to your docker-compose.yaml, so Kompose knows how to create your Kubernetes services. Under any service that is meant to be exposed to your users (i.e. as a web service), add `kompose.service.type: nodeport` and `kompose.service.expose: "true"`:

```yaml
services: 
  web-service:
    <...>:
    labels:
      kompose.service.type: nodeport
      kompose.service.expose: "true"
```

For more details on the types of labels that you can add and for more advanced configuration, please take a look at the [Kompose User Guide](https://kompose.io/user-guide/#labels).

To then convert docker-compose.yaml into a Helm Chart, you run:

```
kompose convert -c
```

By default, this will create your Helm Chart in a folder called `docker-compose/`. In `docker-compose/Chart.yaml`, you should update the `name` field to match whatever you want the name of the chart to be. You can then rename the `docker-compose/` folder as you see fit.<br>

### Pointing at the right containers

Depending on how your docker-compose.yaml is set up, your newly created Helm Chart may not be pointing to a container registry where your images are hosted. To double-check, take a look at all of the files in `<chart-folder>/templates/` of the form `*-deployment.yaml`, and search for the `image:` label. If the images specified are the ones in your cloud container registry, then all is well. To push your containers to the Google Cloud Registry, please see the following [instructions](https://cloud.google.com/container-registry/docs/pushing-and-pulling).

{% hint style="info" %}
Metamanagement recommends using Google Cloud Registry as GCR has a reasonable story for provisioning authentication credentials for use in all Kubernetes environments. If you must use a different container registry, please contact Metamanagement directly.
{% endhint %}
