Skip to content

[Feature] Implement structural Docker HEALTHCHECK in backend deployment containers #938

@Abhishek-Ag-1112

Description

@Abhishek-Ag-1112

Problem Statement

The repository contains multi-stage Dockerfile layers for the production stack, but the configuration lacks an explicit internal HEALTHCHECK instructional block. Without container-level runtime monitoring, container engines (like Docker Compose, Kubernetes, or Render) cannot determine if the internal FastAPl worker thread goes unresponsive or hits a deadlock while the shell process itself remains alive.

Proposed Solution

Introduce a native HEALTHCHECK directive directly inside backend/Dockerfile and docker-compose.yml that target the existing /health or /metrics fast API paths.

The configuration snippet addition inside the final release stage layout of the production Dockerfile should look similar to this:

HEALTHCHECK --interval=30s --timeout=5s --start-period=10s --retries=3 \
  CMD curl -f http://localhost:8000/backend/app/routers/health.py || exit 1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions