Dependency management strategies
Use Background steps to maintain long-running services over the duration of a stage.
You can run a single instance of a service or multiple instances. For examples of these configurations, go to:
- Run a Sauce Connect Proxy service
- Run a LocalStack service
- Run multiple PostgreSQL instances
- Run Docker-in-Docker in a Kubernetes cluster build infrastructure
Harness recommends running health checks on background services so that you can ensure the service is running before attempting to interact with it. This can prevent build failures when steps try to run commands on a service that isn't yet running.
You can also manage dependencies through caching and shared volumes or by installing dependencies in Run steps.