Multi containers communication deployment AWS Lightsail

0

I am developing a project using php on my client side and node.js on my server side. I used docker compose to create one container for each side and I managed to make it work perfectly on my local machine. However, when I try to deploy them under the same service and using "service://localhost" as a enviroment variable I get the "took too long" and "port 80 is not healthy" errors. I'm using port 80 to my client side and port 8000 to my server side. I am new to this and read all the documentation but still am struggling to understand how to do this correctly. I'd appreciate any kind of help!

I tried changing ports, changing the health check path and the timeout seconds but the deployments still fail.

Isadora
질문됨 한 달 전191회 조회
1개 답변
1

Hello,

Without more information, I cannot be certain but it sounds like the health check needs to be configured to hit the container acting as the server in your setup. The errors shared sound like they're trying to reach the client container which is configured on port 80 (and described as unhealthy). A client would typically not be able to respond to health checks as those are meant for a server which can respond.

If you can, sharing a portion or the entirety of your dockerfile could provide useful information in solving this problem. As a reminder, please refrain from sharing any sensitive or private info potentially contained in the dockerfile as this is a public forum.

AWS
jscta
답변함 한 달 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인