-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Docker Compose healthcheck between two containerized ASP.NET Core projs causes hang #440
Comments
@brandonh-msft I'm not able to reproduce a hang, but debugging is broken for me when using depends_on with the health check. Work-around: services:
cis.copilot.netagent:
depends_on:
cis.copilot.orchestrator:
condition: service_started To change the depends_on condition, but only when running through VS FYI The Entrypoint change isn't just to support Fast mode, it's also used in regular mode so that the service can be started under the debugger, but it does mean that depends_on doesn't work reliably. |
That's interesting. What do your containers show when they start up? Mine never run the ASP.NET application - hence my mention of "hang" whereas when I remove the I appreciate the "workaround" of having a couple of VS-specific files, however, without that health check in place I have to write code to handle the exceptions that occur when container 2 attempts to hit container 1. Code that I have to #ifdef around with necessary comments all because of this issue. I shouldn't have to do that... do you agree? |
We recognize it isn't ideal, and have an item on our back log to improve it. But I don't have a timeline you can expect improvement by. |
I was developing an app and have the same problem as you do. My services never get started as long as I have the |
@brandonh-msft <PropertyGroup>
<DependencyAwareStart>true</DependencyAwareStart>
</PropertyGroup> If you can, please try out the preview and let me know if you're unblocked now! |
I have two containers defined in my
docker-compose
:docker-compose.yml
with an override file of
docker-compose.override.yml
I found that, when VS is used to build & deploy the containers, the
entrypoint
of the container is changed to use dotnet roll forward:Instead of respecting the endpoint defined in the Dockerfile for the orchestrator:
orchestrator DOCKERFILE
This is the only diff I can tell between native
docker compose up
and using VS though, admittedly, I haven't done a full diff between bothINSPECT
areas of the resulting container groups.I have tried augmenting my dcproj with
as well as forcing the
entrypoint
value in mydocker-compose.override.yml
but so far have had no luck.When I
docker compose up
from terminal, everything works exactly as it should.How do I fix this?
The text was updated successfully, but these errors were encountered: