Suppose I have the following file docker-compose.ymlthat runs two different python applications in parallel (e.g. via a jar):
app1:
command: python app.py
build: app1/
app2:
command: python app.py
build: app2/
links:
- app1
app2connected with app1, since I want to get certain data from it in it app1. Now my problem is a certain scenario when I want to debug this link. I can easily debug app1both app2as standalone containers (through docker-compose run --service-ports ... python app.pyand placing pdbsomewhere in the code). My problem is when I want to debug app1if the request comes from app2. If I start app1with docker-compose run, then app2cannot resolve the link. This problem becomes even more problematic when more applications / services "talk" to each other depending on their links.
Is there a good way to handle this? How do you feel about the debugging problem with related containers in general (not necessarily python specificc)? Thanks for the input.