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

# Using Subtrace with Docker Compose

> Monitor requests in your Docker Compose app.

If you're using Docker Compose to run your app, you can use Subtrace to monitor
all of your backend requests. Here's how you can get started:

<Steps>
  <Step>
    Make the following change to your `Dockerfile` to install and use Subtrace
    in your app's Docker image:

    ```diff theme={null}
    - CMD ["node", "./app.js"]
    + RUN curl -fsSL https://subtrace.dev/install.sh | sh
    + CMD ["subtrace", "run", "--", "node", "./app.js"]
    ```
  </Step>

  <Step>
    Add the following lines to your service's definition in your `compose.yaml`
    file:

    ```yaml theme={null}
    cap_add:
      - SYS_PTRACE
    ```
  </Step>

  <Step>
    Start your app as you normally would:

    <Expandable title="example output">
      <img className="rounded-xl" src="https://mintcdn.com/subtrace/qpTd5I2XwvFUV3U2/images/docker-compose-link.png?fit=max&auto=format&n=qpTd5I2XwvFUV3U2&q=85&s=9e2871e01c73e9abee33ba3e67779947" width="1524" height="782" data-path="images/docker-compose-link.png" />
    </Expandable>
  </Step>

  <Step>
    That's it! Open the `subt.link` URL in your browser to see your app's requests
    show up in real time:

    <img className="rounded-xl" src="https://mintcdn.com/subtrace/qpTd5I2XwvFUV3U2/images/subt-link-example.png?fit=max&auto=format&n=qpTd5I2XwvFUV3U2&q=85&s=10f6aa739a03934a82f5bd07ec08b398" width="3015" height="1598" data-path="images/subt-link-example.png" />

    <Info>
      It's possible that the `subt.link` URL is printed from within a container.
    </Info>
  </Step>
</Steps>
