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

# Docker Compose

### Overview

Gathering logs from docker-compose scripts is easy to do and all it takes is for your to configure the fluentd driver to push data to Apica Ascent

Lets look at a simple compose file with a single service *"web"*

```yaml
version: '3.7'
services:
  web:
    image: wordpress
    ports:
      - "89:8080"
    logging:
      driver: "fluentd"
      options:
        fluentd-address: 192.168.68.114:24224
        labels: "namespace,application,production_status,cluster_id"
        env: "os"
    labels:
      production_status: "testing"
      namespace: "us-east-1"
      application: "wordpress"
      cluster_id: "cluster1"
    environment:
      - os=ubuntu
```

### Specifying the logging driver

The *fluentd* logging driver can be configured to send logs directly to Apica Ascent either via TLS or non-TLS. use port *24224* for non-TLS and port *24225* for TLS.

```yaml
logging:
  driver: "fluentd"
  options:
    fluentd-address: 192.168.68.114:24224
    labels: "namespace,application,production_status,cluster_id"
    env: "os"
```

### Adding metadata

Logs get organized in Apica Ascent as flows. A Flow is a combination of a *Namespace* and an *application*. You can optionally also add a third grouping attribute *cluster\_id*.

Aside from this, the labels and environment section allows additional metadata to be sent with logs and can be used for search indexing, aggregate queries

```yaml
labels:
  production_status: "testing"
  namespace: "us-east-1"
  application: "wordpress"
  cluster_id: "cluster1"
environment:
  - os=ubuntu
```

<figure><img src="/files/hSzQ96FqDk4HQZYypnbe" alt=""><figcaption><p>Cluster ID, Namespace, Application mapping</p></figcaption></figure>

<figure><img src="/files/Hmo10Xp1AXKBwDQTXCL3" alt=""><figcaption><p>Additional Metadata</p></figcaption></figure>
