Skip to content

Commit b6305a1

Browse files
committed
feat: add Nixpacks configuration and health check endpoint
1 parent 77e73ae commit b6305a1

File tree

2 files changed

+22
-0
lines changed

2 files changed

+22
-0
lines changed

nixpacks.toml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
[phases.setup]
2+
nixPkgs = ['nodejs_20', 'pnpm-9_x']
3+
4+
[phases.install]
5+
cmds = ['pnpm i --frozen-lockfile']
6+
7+
[phases.build]
8+
cmds = ['pnpm run build']
9+
10+
[start]
11+
cmd = 'node build/index.js'
12+
13+
[healthcheck]
14+
cmd = 'curl -f http://localhost:3001/health'
15+
interval = '10s'
16+
timeout = '5s'
17+
retries = 3

src/routes/health/+server.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
import type { RequestHandler } from '@sveltejs/kit';
2+
3+
export const GET: RequestHandler = async () => {
4+
return new Response('OK', { status: 200 });
5+
};

0 commit comments

Comments
 (0)