Skip to content

Commit

Permalink
feat!: docker health check (#92, #93)
Browse files Browse the repository at this point in the history
  • Loading branch information
hywax authored Apr 19, 2024
1 parent 1d77218 commit 8c85b6e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,6 @@ COPY --from=build /app/.output /app

EXPOSE 3000/tcp

HEALTHCHECK --interval=10s --timeout=5s --start-period=10s CMD node -e "require('http').get('http://localhost:3000/api/health', res => process.exit(res.statusCode === 200 ? 0 : 1)).on('error', () => process.exit(1))"

CMD ["/app/server/index.mjs"]
1 change: 1 addition & 0 deletions src/server/api/health.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export default defineEventHandler(() => '')

0 comments on commit 8c85b6e

Please sign in to comment.