From db6e7603f932c579a8b57a2d73964dc3987d997e Mon Sep 17 00:00:00 2001 From: lksz Date: Fri, 10 Sep 2021 01:02:26 -0400 Subject: [PATCH] Fixes #376 + .dockerignore improvement --- .dockerignore | 2 ++ Dockerfile | 7 ++++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/.dockerignore b/.dockerignore index a865156..d2400f9 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1,3 +1,5 @@ +Dockerfile +.git npm-debug.log node_modules *.swp diff --git a/Dockerfile b/Dockerfile index dd53efc..c9e0829 100644 --- a/Dockerfile +++ b/Dockerfile @@ -59,5 +59,10 @@ STOPSIGNAL SIGINT ENTRYPOINT [ "bash", "docker-entrypoint.sh" ] HEALTHCHECK --interval=30s --timeout=30s --start-period=5s \ - --retries=3 CMD [ "curl" , "-f" "localhost:${PORT}", "||", "exit", "1"] + --retries=3 CMD [ "sh", "-c", "echo -n 'curl localhost:7777... '; \ + (\ + curl -sf localhost:7777 > /dev/null\ + ) && echo OK || (\ + echo Fail && exit 2\ + )"] CMD ["npm", "start"]