Conform the use of docker images by implementing the use of environment variables for all options available to Docker images and start node on docker run automatically.

This commit is contained in:
schlagmichdoch 2023-10-28 02:17:59 +02:00
parent b4e74c2dd1
commit 750f54301d
6 changed files with 462 additions and 350 deletions

View file

@ -8,7 +8,12 @@ RUN npm ci
COPY . .
# environment settings
ENV NODE_ENV="production"
EXPOSE 3000
HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 \
CMD wget --quiet --tries=1 --spider http://localhost:3000 || exit 1
ENTRYPOINT ["node", "index.js"]