# Docker compose

{% hint style="info" %}
If you plan to upgrade your Akamas instance, please verify the upgrade path with the Akamas support team. To ensure rollback in case of upgrade failure, it is suggested to backup your studies (see section [User data backup](/akamas-docs/3.6/managing-akamas/backup-and-recover-of-the-akamas-server.md#user-data-backup)).
{% endhint %}

### Docker compose Configuration <a href="#patchesandupgrades-docker-composeconfiguration" id="patchesandupgrades-docker-composeconfiguration"></a>

To start with the upgrade, on the Akamas server navigate to the same folder where the `docker-compose.yml` and `.env` file are stored (see section [Get Akamas Docker artifacts](/akamas-docs/3.6/installing/docker/install-the-akamas-server/online-installation-mode.md#get-akamas-docker-artifacts)). Now you can download the latest version compose file:

```bash
mv docker-compose.yml docker-compose.yml.bak
curl -O https://s3.us-east-2.amazonaws.com/akamas/compose/3.6.3/docker-compose.yml
```

You can point to a specific version. As an example to download the artifact for version `3.5.0`:

```bash
curl -O https://s3.us-east-2.amazonaws.com/akamas/compose/3.5.0/docker-compose.yml
```

If the old `docker-compose` has been changed and it is still needed in the newer Akamas version, make sure to migrate such changes from `docker-compose.yml.bak` to the `docker-compose.yml` .

Ensure your `.env` file is up to date with the required variables, by comparing your version with the one at [Configure Akamas environment variables](/akamas-docs/3.6/installing/docker/install-the-akamas-server/online-installation-mode.md#configure-akamas-environment-variables).

Then log in to AWS with the following command:

```bash
aws ecr get-login-password --region us-east-2 | docker login --username AWS --password-stdin 485790562880.dkr.ecr.us-east-2.amazonaws.com
```

If the login succeeds, then you can start the upgrade by running:

```bash
docker compose up -d
```

Wait for a few minutes and check the Akamas services are running the command:

```bash
akamas status -d
```

The expected output should be like the following (repeat the command after a minute or two if the last line is not "OK" as expected):

```
Checking Akamas services on http://localhost:8000
service       status
=========================
analyzer      UP
campaign      UP
metrics       UP
optimizer     UP
orchestrator  UP
system        UP
telemetry     UP
license       UP
log           UP
users         UP
OK
```


---

# 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.akamas.io/akamas-docs/3.6/managing-akamas/upgrade/compose.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.
