From 99d81e1713e5c8a16099a9ec51778e947b62903a Mon Sep 17 00:00:00 2001 From: Dmytro Pashynskyi Date: Fri, 6 Sep 2024 10:59:04 +0300 Subject: [PATCH] feat: add Docker healthcheck --- Dockerfile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Dockerfile b/Dockerfile index 3c62f63c71..7063110093 100644 --- a/Dockerfile +++ b/Dockerfile @@ -40,5 +40,8 @@ USER nextjs # Expose the port the app will run on EXPOSE 3000 9464 +HEALTHCHECK --interval=10s --timeout=5s --start-period=30s --retries=6 \ + CMD wget --no-verbose --tries=1 --spider http://localhost:3000/api/health || exit 1 + # Start the application CMD ["/app/startup.sh"]