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
asked 22 days ago178 views
1 Answer
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
answered 16 days ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions