diff --git a/Dockerfile b/Dockerfile index 4a75ea3..afd49ea 100644 --- a/Dockerfile +++ b/Dockerfile @@ -24,4 +24,7 @@ RUN mv ./build/* /var/www/site/ EXPOSE 3000 +HEALTHCHECK --interval=30s --timeout=5s --start-period=60s --retries=3 \ + CMD curl -f http://localhost:3000/health || exit 1 + ENTRYPOINT ["bun", "/var/www/site/index.js"] diff --git a/src/routes/health/+server.js b/src/routes/health/+server.js new file mode 100644 index 0000000..74759c1 --- /dev/null +++ b/src/routes/health/+server.js @@ -0,0 +1,3 @@ +export function GET() { + return new Response('OK', { status: 200 }); +}