diff --git a/app/api/health/route.ts b/app/api/health/route.ts new file mode 100644 index 0000000..4e09dd5 --- /dev/null +++ b/app/api/health/route.ts @@ -0,0 +1,5 @@ +import { NextResponse } from 'next/server'; + +export async function GET() { + return NextResponse.json({ status: 'ok' }, { status: 200 }); +} diff --git a/docker-compose.yaml b/docker-compose.yaml index c75e44a..5aee946 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -12,7 +12,7 @@ services: - "traefik.http.services.mb-grid-solutions.loadbalancer.server.port=3000" - "traefik.http.routers.mb-grid-solutions.middlewares=auth@docker" healthcheck: - test: ["CMD", "node", "-e", "fetch('http://localhost:3000/health').then(r => r.ok ? process.exit(0) : process.exit(1)).catch(() => process.exit(1))"] + test: ["CMD", "node", "-e", "fetch('http://127.0.0.1:3000/health').then(r => r.ok ? process.exit(0) : process.exit(1)).catch(() => process.exit(1))"] interval: 5s timeout: 2s retries: 10