Add healthcheck

This commit is contained in:
2026-01-15 09:41:02 +01:00
parent 38e5654341
commit 58b8cf3bdc
2 changed files with 14 additions and 2 deletions

View File

@@ -1,8 +1,15 @@
FROM node:lts-alpine
USER node
WORKDIR /app
ENV NODE_ENV production
ENV TZ Europe/Warsaw
ENV NODE_ENV=production
ENV TZ=Europe/Warsaw
COPY --chown=node:node index.mjs ./
EXPOSE 3000
CMD ["node", "./index.mjs"]
HEALTHCHECK \
--interval=10s \
--timeout=5s \
--start-period=3s \
--retries=3 \
CMD ["wget", "http://localhost/health", "-O", "/dev/null", "-q"]