Manage 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.
When to modify the Environment
If Kerno cannot start your environment, or if you want to adjust what it spins up, you 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.
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.
How the Process Works
Inspect the generated docker compose YAML file to understand what Kerno created.
Open the docker compose md file.
Add your guidance or corrections.
Save the file.
Click Regenerate docker compose.
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:
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.Kerno reads these notes and adjusts the generated docker compose file accordingly.
Last updated