Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions content/self-hosting/3.deploying.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,13 @@ services:
condition: service_healthy
cache:
condition: service_healthy
healthcheck:
test: ["CMD-SHELL", "wget --spider -q http://localhost:8055/server/health || exit 1"]
interval: 10s
timeout: 5s
retries: 5
start_interval: 5s
start_period: 30s
environment:
SECRET: "REPLACE_WITH_YOUR_SECRET"

Expand All @@ -109,3 +116,12 @@ services:
**Request Other Examples**
We're keeping this section light for now, but if you need examples for other database providers, let us know!
::

## Health Checks

The Docker Compose example above includes health checks for all services. If you run other containers that depend on Directus being ready, use `depends_on` with `condition: service_healthy` to wait for Directus to start accepting requests.

Directus exposes two endpoints for health monitoring:

- `/server/health` - returns detailed health status including database and cache connectivity. Returns a `503` if any dependency is unhealthy (for example, a missing email transport configuration).
- `/server/ping` - returns `pong` if the HTTP server is running, regardless of dependency status. Use this if you only need to confirm the server is accepting requests.