# Manage Your Test Environment

Kerno creates a docker compose file that defines the services needed to run your tests. This file is generated automatically and fully managed by Kerno.

<figure><img src="/files/G7ozN4xSoIMbUg90Se5q" alt=""><figcaption></figcaption></figure>

### When to modify the Environment

If Kerno cannot start your environment, or if you want to adjust what it spins up, you can provide instructions inside the `docker compose md` file. This file acts as guidance for Kerno so it knows how to build an environment that matches your needs.

Use the `docker compose md` file when you want to:

* Add missing services or environment variables
* Tell Kerno to ignore a dependency
* Change service ports
* Add extra context that Kerno cannot infer automatically
* Fix issues that prevent the test environment from starting

All adjustments must be made in the md file. Kerno then applies those instructions the next time you regenerate the environment.

{% hint style="warning" %}
Do not modify the generated docker compose YAML directly. Any manual edit will be overwritten by Kerno. All **changes must** go in the `docker compose md` file so Kerno can apply them safely.
{% endhint %}

### How the Process Works

1. Inspect the generated docker compose YAML file to understand what Kerno created.
2. Open the docker compose md file.
3. Add your guidance or corrections.
4. Save the file.
5. Click **Regenerate docker compose**.
6. Kerno rebuilds the environment using your updated guidance.

### Example Guidance

Here is a simple example of what you might write in the docker compose md file:

{% code title="Example Guidance" overflow="wrap" lineNumbers="true" %}

```
The database service should expose port 5434 instead of 5432.
Do not include the Redis service because this project does not use it for testing.
Add an API_URL environment variable to the app service and set it to http://localhost:4000.
Ignore the analytics service since it is optional.
```

{% endcode %}

Kerno reads these notes and adjusts the generated docker compose file accordingly.

{% hint style="info" %}
If you encounter issues check out the [Environment setup troubleshooting guide](/docs/troubleshooting/environment-setup-issues.md) or [message us on Discord](https://discord.gg/k8yA9tZdP9), and we’ll gladly help.
{% endhint %}


---

# 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://kerno.gitbook.io/docs/user-manual/manage-your-test-environment.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.
