diff --git a/Dockerfile b/Dockerfile index b1a3012..ce88b63 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,8 +1,10 @@ FROM node:lts-alpine -WORKDIR /home/node/app +RUN apk update +RUN apk add --no-cache tini && \ + rm -f /var/cache/apk/* -COPY ./pairdrop/package*.json ./ +COPY ./pairdrop/package*.json . RUN npm ci @@ -13,7 +15,5 @@ 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 ["npm", "start"] +ADD ./docker_entrypoint.sh /usr/local/bin/docker_entrypoint.sh +RUN chmod a+x /usr/local/bin/docker_entrypoint.sh diff --git a/docker_entrypoint.sh b/docker_entrypoint.sh index 43c88a1..6aa3f38 100644 --- a/docker_entrypoint.sh +++ b/docker_entrypoint.sh @@ -1,3 +1,3 @@ #!/bin/bash -NODE_ENV="production" npm start \ No newline at end of file +NODE_ENV="production" exec tini -- npm start \ No newline at end of file