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(), + }); +};