79762291

Date: 2025-09-11 19:01:16
Score: 0.5
Natty:
Report link

The issue relied elsewhere and not entirely in the docker-compose file. The real problem were the base images I was using. As they were minimal, they did not have the curl command and therefore the healthcheck was failing. The solution was just to install curl in the containers within the Dockerfiles.

The base images I was using were python:3.13-slim and node:24-alpine just in case this is useful for someone.

And the solution was to add:

In the python:3.13-slim Dockerfile:

RUN apt-get update && apt-get install -y curl

In the node:24-alpine Dockerfile:

RUN apk add --no-cache curl

Then I had to change the port of the healthcheck for the aiservice because although the port I expose is 8081 internally the port where the app is running is 8080, so the healthcheck ended looking like:

healthcheck:
      test: ["CMD", "curl", "-f", "http://localhost:8000/health"] # Note that the port has changed!
      interval: 10s
      timeout: 30s
      retries: 5

The key was in running the docker ps command, as Alex Oliveira and sinuxnet had stated. With that I could see that the containers that started were flagged as unhealthy.

The port issue was discovered thanks to some comments in the staging area, even before the post was made public. Heads up to wallenborn as he posted that comment in the staging area.

PD: I am sure this post could be paraphrased better but it is my first time posting something, I'll try to update it to make it more readeable.

Reasons:
  • Blacklisted phrase (0.5): thanks
  • Long answer (-1):
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: Carlos Lavilla