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
質問済み 1ヶ月前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
回答済み 1ヶ月前

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ