Skip to content

docker-compose.yml has no healthchecks for api or db services #10

Description

@abayomicornelius

Neither the db (postgres:16-alpine) nor api service in docker-compose.yml defines a healthcheck: block, so depends_on: [db] only waits for the container to start, not for Postgres to actually be ready to accept connections — the API can attempt to connect and fail on cold start.

Add a pg_isready-based healthcheck for db and a curl /health-based healthcheck for api, then use depends_on: condition: service_healthy.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions