Skip to content

Commit be269da

Browse files
authored
Merge pull request #190 from edisonqu/patch-1
fix; create healthcheck url for samples nextjs
2 parents 6a2dcbf + e1cb58c commit be269da

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

compose.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,15 @@ services:
55
build:
66
context: ./app
77
dockerfile: Dockerfile
8+
89
ports:
910
- target: 3000
1011
mode: ingress
1112
published: 3000
13+
14+
healthcheck:
15+
test: wget -q --spider http://localhost:3000/api/health || exit 1
16+
1217
deploy:
1318
resources:
1419
reservations:

web/src/app/api/health/route.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
import { NextResponse } from 'next/server';
2+
3+
export async function GET() {
4+
return NextResponse.json({ msg: 'Success!' });
5+
}

0 commit comments

Comments
 (0)