Skip to content

Commit aa2b2eb

Browse files
Add /healthz endpoint to frontend and backoffice
Adds a Nitro route handler at /healthz for each Nuxt app, used by Docker Compose healthchecks to monitor service availability. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 4948e2f commit aa2b2eb

3 files changed

Lines changed: 14 additions & 0 deletions

File tree

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export default defineEventHandler(() => ({ status: 'ok' }));

compose.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,12 @@ services:
3232
build: ./frontend
3333
ports:
3434
- "3000:3000"
35+
healthcheck:
36+
test: ["CMD-SHELL", "curl -sf http://localhost:3000/healthz || exit 1"]
37+
interval: 10s
38+
timeout: 5s
39+
retries: 3
40+
start_period: 15s
3541
depends_on:
3642
temporal:
3743
condition: service_healthy
@@ -43,6 +49,12 @@ services:
4349
build: ./backoffice
4450
ports:
4551
- "3001:3001"
52+
healthcheck:
53+
test: ["CMD-SHELL", "curl -sf http://localhost:3001/healthz || exit 1"]
54+
interval: 10s
55+
timeout: 5s
56+
retries: 3
57+
start_period: 15s
4658
depends_on:
4759
temporal:
4860
condition: service_healthy
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export default defineEventHandler(() => ({ status: 'ok' }));

0 commit comments

Comments
 (0)