Skip to content

add health readiness API endpoint#599

Open
danangmassandy wants to merge 3 commits intomainfrom
feat-health-endpoint
Open

add health readiness API endpoint#599
danangmassandy wants to merge 3 commits intomainfrom
feat-health-endpoint

Conversation

@danangmassandy
Copy link
Collaborator

Fix https://github.com/unicef-drp/GeoRepo/issues/1264

Endpoint: GET /ready/

Response:

HTTP 200 OK
Allow: GET, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "status": "ready",
    "checks": {
        "database": true,
        "redis": true,
        "storage": true
    },
    "storage_info": {
        "logs": {
            "path": "/home/web/logs",
            "total_gb": 434.36,
            "used_gb": 344.81,
            "free_gb": 67.42,
            "usage_percent": 79.38
        },
        "media": {
            "path": "/home/web/media",
            "total_gb": 434.36,
            "used_gb": 344.81,
            "free_gb": 67.42,
            "usage_percent": 79.38
        },
        "static": {
            "path": "/home/web/static",
            "total_gb": 434.36,
            "used_gb": 344.81,
            "free_gb": 67.42,
            "usage_percent": 79.38
        }
    }
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant