From 5a8d52a5e3e76e735cf135e33596f70cc548b138 Mon Sep 17 00:00:00 2001 From: emil-lengman Date: Sat, 22 Aug 2020 20:56:11 +0200 Subject: [PATCH] add healthcheck, and stopsignal, plus export the correct port --- Dockerfile | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 136b5b6..bcbfe43 100644 --- a/Dockerfile +++ b/Dockerfile @@ -52,8 +52,10 @@ ENV RATELIMITS_NORMAL_TOTAL_REQUESTS=500\ RATELIMITS_BLACKLIST=example1.blacklist,example2.blacklist ENV DOCUMENTS=about=./about.md -EXPOSE 7777 - +EXPOSE ${PORT} +STOPSIGNAL SIGINT ENTRYPOINT [ "bash", "docker-entrypoint.sh" ] +HEALTHCHECK --interval=30s --timeout=30s --start-period=5s \ + --retries=3 CMD [ "curl" , "-f" "localhost:${PORT}", "||", "exit", "1"] CMD ["npm", "start"]