diff --git a/Dockerfile b/Dockerfile index 83f32ce..0479df2 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,4 +4,6 @@ COPY package*.json ./ RUN npm install COPY . . EXPOSE 3000 +HEALTHCHECK --interval=30s --timeout=3s --start-period=5s --retries=3 \ + CMD node -e "require('http').get('http://localhost:3000/', (r) => {process.exit(r.statusCode === 200 ? 0 : 1)})" CMD ["node", "server.js"]