From 475246a55dca37878e9a0b4d8941046ccf74358f Mon Sep 17 00:00:00 2001 From: Till-JS <101404291+Till-JS@users.noreply.github.com> Date: Mon, 26 Jan 2026 09:44:17 +0100 Subject: [PATCH] fix(todo): correct health check endpoints - Backend: Fix Dockerfile health check path (/api/v1/health -> /health) - Web: Add missing /health endpoint for Docker health checks Co-Authored-By: Claude Opus 4.5 --- apps/todo/apps/backend/Dockerfile | 2 +- apps/todo/apps/web/src/routes/health/+server.ts | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 apps/todo/apps/web/src/routes/health/+server.ts diff --git a/apps/todo/apps/backend/Dockerfile b/apps/todo/apps/backend/Dockerfile index e589ef07b..69cd9179f 100644 --- a/apps/todo/apps/backend/Dockerfile +++ b/apps/todo/apps/backend/Dockerfile @@ -60,7 +60,7 @@ EXPOSE 3018 # Health check HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 \ - CMD wget --no-verbose --tries=1 --spider http://localhost:3018/api/v1/health || exit 1 + CMD wget --no-verbose --tries=1 --spider http://localhost:3018/health || exit 1 # Run entrypoint script ENTRYPOINT ["docker-entrypoint.sh"] diff --git a/apps/todo/apps/web/src/routes/health/+server.ts b/apps/todo/apps/web/src/routes/health/+server.ts new file mode 100644 index 000000000..a8bdb1905 --- /dev/null +++ b/apps/todo/apps/web/src/routes/health/+server.ts @@ -0,0 +1,10 @@ +import { json } from '@sveltejs/kit'; +import type { RequestHandler } from './$types'; + +export const GET: RequestHandler = async () => { + return json({ + status: 'ok', + service: 'todo-web', + timestamp: new Date().toISOString(), + }); +};