GithubHelp home page GithubHelp logo

Comments (2)

ndeloof avatar ndeloof commented on July 28, 2024

For containers to communicate, those must be connected to a common network. Compose creates one by default for this purpose, if you have no reason to set network1/network2 just remote all networks declaration

from compose.

wisamidris7 avatar wisamidris7 commented on July 28, 2024

I initially encountered issues not with SQL Server or myApp, but with gRPC communication between two applications within the same docker-compose setup.

My goal was to configure these applications for both HTTP/1 and HTTP/2 communication. However, I discovered that HTTP/1 and HTTP/2 require HTTPS or TLS for proper functionality.

In my ASP.NET Core project, which utilizes both gRPC and HTTP APIs, everything worked perfectly locally. But upon deploying to Docker, I encountered a problem: HTTP/2 is not supported, and HTTP/1 was required for gRPC calls from myapp1 to myapp2.

To address this, I configured myapp2 to use HTTPS with a domain name and certificate through Kestrel, setting HttpProtocol to Http1AndHttp2. While this configuration worked for requests from Chrome (using HTTP/1) and an empty gRPC console application (using HTTP/2), requests from myapp1 to myapp2 failed. They went through IP address-based communication and resulted in certificate validation errors due to the use of HTTPS.

I attempted to resolve this by changing the URL from https://myapp2:10000 to https://example.com:3912, but this led to timeout issues with gRPC requests. Additionally, I tried isolating each service in separate networks, but this did not resolve the issue.

I am also encountering similar problems when using reverse proxies like Nginx, as it does not seem to support HTTP/1 and HTTP/2 properly.

Given these challenges, I am concerned that this might be a Docker-related issue, especially since the problem persists even when services are in different networks. Any insights or suggestions would be greatly appreciated.

from compose.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.