Add healthcheck
This commit is contained in:
11
Dockerfile
11
Dockerfile
@@ -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"]
|
||||
|
||||
Reference in New Issue
Block a user