You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 767f692
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: docs/docker.mdx
+10-2Lines changed: 10 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -155,7 +155,7 @@ docker run -d \
155
155
Codra exposes two health endpoints:
156
156
157
157
*`GET /health` is the liveness probe. It returns HTTP `200 OK` while the process is up and does not touch PostgreSQL or Redis.
158
-
*`GET /health/ready` is the readiness probe. It runs `SELECT 1` against PostgreSQL and reads a key from Redis (Workers KV on Cloudflare), each with a 2 second timeout. It returns `200` when both answer, and `503` with a JSON body when one does not:
158
+
*`GET /health/ready` is the readiness probe. It runs `SELECT 1`on Node (`SELECT clock_timestamp()` on Workers Hyperdrive to bypass edge SQL caching) against PostgreSQL and `PING` on Redis (a `get` of `__health_check__`on Workers KV), each with a 2 second timeout. It returns `200` when both answer, and `503` with a JSON body when one does not:
159
159
160
160
```json
161
161
{
@@ -168,15 +168,23 @@ Codra exposes two health endpoints:
168
168
}
169
169
```
170
170
171
-
The `error` field is `timeout` or `unreachable`; the server log records only the error name and code, never the connection details. The `docker-compose.yml` health check calls `/health/ready`, so a container whose database or Redis is down is reported unhealthy. For Kubernetes, point the readiness probe at the same path:
171
+
The `error` field is `timeout` or `unreachable`; the server log records only the error name and code, never the connection details. The `docker-compose.yml` health check calls `/health/ready`, so a container whose database or Redis is down is reported unhealthy (keep in mind that auto-restart supervisors acting on Docker health will restart the container during an external dependency outage). For Kubernetes, keep `livenessProbe` on `/health` and point `readinessProbe`at `/health/ready` with `timeoutSeconds` greater than the 2 second probe deadline:
***Healthcheck**: Returns HTTP `200 OK` when the process is responsive. It does not touch PostgreSQL or Redis.
148
-
***Readiness**: `GET /health/ready` runs `SELECT 1` on PostgreSQL and reads a key from Redis, and returns HTTP `503` with a JSON `checks` body when either does not answer within 2 seconds.
148
+
***Readiness**: `GET /health/ready` runs `SELECT 1` on PostgreSQL and `PING` on Redis, and returns HTTP `503` with a JSON `checks` body when either does not answer within 2 seconds.
149
149
***BullMQ Logging**: Worker lifecycle events (`completed`, `failed`) are automatically logged through the centralized `@codraoss/api` logger.
150
150
***Automatic Model Registry**: An unreferenced background timer refreshes available model catalogs every hour with zero impact on database connection pools.
0 commit comments