From f7dc75abd900f1cdfff03a983e6eab09a33f3537 Mon Sep 17 00:00:00 2001 From: Jamison Bennett Date: Wed, 8 Apr 2020 15:08:08 -0500 Subject: [PATCH] Fix cadence-web container to exit on SIGTERM The cadence web container was fixed so that it properly handles the SIGTERM signal. It used to wait until a timeout occurred and then it would be forceable killed with SIGKILL. This was tested locally to verify that the cadence web container was gracefully terminated with SIGTERM. --- Dockerfile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index de0f730d3..cee36735b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -9,6 +9,9 @@ ENV NPM_CONFIG_PRODUCTION=true COPY package*.json ./ RUN npm install --production +RUN wget https://github.com/Yelp/dumb-init/releases/download/v1.2.2/dumb-init_1.2.2_amd64.deb +RUN dpkg -i dumb-init_*.deb + # Bundle app source COPY . . @@ -16,4 +19,4 @@ COPY . . RUN npm run build-production EXPOSE 8088 -CMD [ "node", "server.js" ] \ No newline at end of file +CMD [ "dumb-init", "node", "server.js" ] \ No newline at end of file