# Customizing Container Services

## Background

The following are examples of what custom container services can be used for:

* When recording requests from a service, a local instance may be needed. The local instance of the service can be added here
* When testing, a custom container can be used to trigger the tests after all the services have initialized. An `entrypoint` service is provided for this purpose

## Customizing

1. Each workflow provides a `docker-compose.yml` for the purpose of adding custom container services. It can be accessed in the following location:

```bash
.stoobly/services/<SERVICE-NAME>/<WORKFLOW-NAME>/docker-compose.yml
```

{% hint style="info" %}
Modifications to this file will not be overriten when the `service create` command is re-run.
{% endhint %}

2. Custom services should be added under the `services` property. A custom service also needs to include the workflow name under `profiles` . For example, if the current workflow is `record`, then:

```bash
$ cat .stoobly/services/<SERVICE-NAME>/<WORKFLOW-NAME>/docker-compose.yml

services: 
  helloWorld:
    image: hello-world
    profiles:
      - record
```

3. Optional: if your custom service requires network access to other container services, then specify the appropriate network. To learn more about which network to specify, see:

{% content-ref url="/pages/hvGjzhgu6l2Nw4iB48E6" %}
[Scaffold](/core-concepts/scaffold.md)
{% endcontent-ref %}

For example:

```bash
$ cat .stoobly/services/<SERVICE-NAME>/<WORKFLOW-NAME>/docker-compose.yml

services: 
  helloWorld:
    image: hello-world
    networks:
      - app.egress
    profiles:
      - record
```


---

# 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.stoobly.com/guides/how-to-integrate-e2e-testing/how-to-scaffold-an-app/customizing-a-workflow/customizing-container-services.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.
