diff --git a/Dockerfile b/Dockerfile index 5717823..7e48aba 100644 --- a/Dockerfile +++ b/Dockerfile @@ -31,4 +31,6 @@ COPY --from=build --chown=streamgive:nodejs /app/dist ./dist USER streamgive EXPOSE 3000 +HEALTHCHECK --interval=30s --timeout=3s --start-period=20s --retries=3 \ + CMD node -e "fetch('http://127.0.0.1:3000/health').then((response) => process.exit(response.ok ? 0 : 1)).catch(() => process.exit(1))" CMD ["node", "dist/index.js"]