When adopting Telepresence, you may be hesitant to throw away all the investment you made replicating your infrastructure with Docker Compose.
Telepresence Intercept Specifications are integrated with Docker Compose! Let's look at an example to see how it works.
Below is an example of an Intercept Spec and Docker Compose file that is intercepting an echo service with a custom header and being handled by a service created through Docker Compose.
The Docker Compose file is creating two services, a postgres database, and your local echo service. The local echo service is utilizing Docker's watch feature to take advantage of hot reloads.
Docker compose file:
By combining Intercept Specifications and Docker Compose, you can intercept the traffic going to your cluster while developing on multiple local services and utilizing hot reloads.
- Using Docker Compose with Telepresence allows you to have a hybrid development setup between local & remote.
- You can reuse your existing setup with minimum effort.